The Wayback Machine - https://web.archive.org/web/20211024165315/https://github.com/topics/jsonschema
Skip to content
#

jsonschema

Here are 179 public repositories matching this topic...

s-knibbs
s-knibbs commented Jun 30, 2019

It seems that the typing module doesn't flatten nested literal type definitions, so the following does not currently work:

SuccessStatus = Literal[200, 201, 204]
ClientError = Literal[404, 401, 403, 409, 400]
ServerError = Literal[500, 504, 503]

@dataclass
class HttpResponse(JsonSchemaMixin):
    status: Literal[SuccessStatus, ClientError, ServerError]
    ...
abompard
abompard commented Jul 22, 2021

When loading messages from the serialized format in order to send them, the "queue" attribute will not be used. It should therefore not be mandated by the JSON schema.

When the queue attribute is not specified or set to None, we get:

Usage: fedora-messaging publish [OPTIONS] FILE
 
Error: Unable to validate message: None is not of type 'string'
 
Failed validating 'type' in schema

Improve this page

Add a description, image, and links to the jsonschema 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 jsonschema topic, visit your repo's landing page and select "manage topics."

Learn more