Skip to content
#

json-schema

Here are 1,455 public repositories matching this topic...

fastapi
tiangolo
tiangolo commented Jun 12, 2020

First check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the FastAPI documentation, with the integrated search.
  • I already searched in Google "How to X in FastAPI" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answ
enhancement good first issue confirmed
schani
schani commented Sep 11, 2018
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/foo",
  "definitions": {
    "foo": {
      "type": "object",
      "properties": {
        "bar": {
          "$ref": "bar.json#"
        },
      },
      "required": [
        "bar"
      ],
    },
    "title": "foo"
  }
}

Running quicktype CLI with this Schema produces

Error
bug CLI good first issue
pyramation
pyramation commented Jun 25, 2022

Empty enums such as this

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "QueryMsg",
  "type": "string",
  "enum": []
}

produces

export type QueryMsg = ()

which fails as the syntax is not correct

 FAIL  __tests__/index.test.js
  ✕ compiles (186 ms)

  ● compiles

    SyntaxError: '=>' expected. (9:1)
      7 |
      8
mausch
mausch commented Apr 2, 2020

The title might seem a bit vague but I don't know how to describe it any better tbh :-)

Anyway this is what happened: I got some 500 responses from the schema registry and all I could see in the logs was :

[2020-04-02 16:03:35,048] INFO 100.96.14.58 - - [02/Apr/2020:16:03:34 +0000] "PUT /config/some-topic-value HTTP/1.1" 500 69  502 (io.confluent.rest-utils.requests)

The logs di

spectral
hjoukl
hjoukl commented Jul 7, 2022

I still think this is a sensible (opinionated, admittedly) addition to the spectral:oas ruleset.
IMHO if you define properties in an OAS schema ("struct" data) you probably never want to accept data as valid that doesn't even have these properties/attributes.

(I confusingly added that to #2136 so that kind of got mixed up with this separate JSON schema related issue, sorry)

Here goes, again

enhancement help wanted good first issue p/longterm

Improve this page

Add a description, image, and links to the json-schema topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the json-schema topic, visit your repo's landing page and select "manage topics."

Learn more