jsonschema Questions

2

There is some questions around this topic, but I dind't find the right way to do it. What I want is to define all parameters in a single place and reuse it with no need to write it again. I alread...
Myrlemyrlene asked 5/6, 2020 at 9:56

4

Solved

How can I define a recursive Pydantic model? Here's an example of what I mean: from typing import List from pydantic import BaseModel class Task(BaseModel): name: str subtasks: List[Task] = [] ...
Malo asked 22/6, 2021 at 22:43

5

I have a POJO class: public class Stock { int id; String name; Date date; } Are there any annotations or development framework/API that can convert POJO to JSON schema like below: {"id&quo...
Gwen asked 5/10, 2014 at 4:50

7

I have a set of jsonschema compliant documents. Some documents contain references to other documents (via the $ref attribute). I do not wish to host these documents such that they are accessible at...
Residential asked 29/12, 2018 at 10:39

3

Solved

Its looking like both works fine with my input validation code. Then what is the exact difference? Schema with oneof [{ "id": "MyAction", "oneOf": [{ "$ref": "A1" }, { "$ref": "A2" }] }, { ...
Antananarivo asked 2/12, 2015 at 8:40

5

Solved

Is there a python library for converting a JSON schema to a python class definition, similar to jsonschema2pojo -- https://github.com/joelittlejohn/jsonschema2pojo -- for Java?
Euchologion asked 17/9, 2012 at 19:5

4

Solved

Apache Avro provides a compact, fast, binary data format, rich data structure for serialization. However, it requires user to define a schema (in JSON) for object which need to be serialized. In ...
Keown asked 9/4, 2014 at 6:18

4

Solved

A relatively new addition to JSON Schema (draft-07) adds the if, then and else keywords. I cannot work out how to use these new keywords correctly. Here is my JSON Schema so far: { "type&quot...
Ginnifer asked 26/7, 2018 at 13:5

1

We use protocol buffers(protobuf) to define our schemas internally and have translators to translate to various other internal representations such as JSON Schema(Protobuf to JSON schema converter)...

7

I am using a library com.fasterxml.jackson library for JsonSchema, I am creating an IntegerSchema object, when I set range for integer schema using below code: main(){ IntegerSchema intSchema = ne...
Ron asked 9/6, 2016 at 9:36

3

Solved

in JSON-schema, one can require certain keys in an object, see this example, taken from the json schema docs: { "type": "object", "properties": { "name": ...
Messaline asked 7/12, 2021 at 18:51

8

So I was working on a project and today I saw an error about VScode being unable to resolve package.json schema: CSS contributions to package.json Problems loading reference 'vscode://schemas/sett...
Dipterous asked 24/2, 2023 at 15:43

3

Solved

According to the following post; Does JSON syntax allow duplicate keys in an object? Keys with the same name in JSON are valid, but most parsers will override the value with the last value it fin...
Banker asked 8/10, 2014 at 14:48

2

Solved

We have been using OpenAPI 3.0.x specification, which adds feature for declaring nullable properties. When I import this OpenAPI into AWS API Gateway, corresponding model does not honor this nullab...
Pinochle asked 28/3, 2022 at 14:55

3

Solved

We have a fairly large and complex json schema with many includes via $ref references. Ideally using Python and jsonschema I'd like to take those schema and fully expand the references (recursively...
Nestorius asked 1/11, 2017 at 11:46

4

Solved

I'm using jsonschema to validate my python dictionary. I' trying to validate a datetime value but I'm not sure how to do it. Here's what I have so far, which results in an error because jsonschema...
Incommunicado asked 6/9, 2018 at 18:46

4

One of our development partners have asked if there is a way we could specify an interface version within our JSON Schema definition. There isn't a "$version" key so is there a recognised...
Hospitalize asked 7/4, 2020 at 9:53

2

Solved

Say I have a JSON schema that allows for an object like so: ... "assetMetadata": { "type": "object", "additionalProperties": false, "properties": { ... } } ... So say I want to change this ...
Inveigh asked 4/4, 2016 at 21:16

3

I am using the jsonschema package in python to validate my JSONs. I can set default in jsonschema. Let us assume the following schema: from jsonschema import validate schema = { "type":...
Additament asked 28/4, 2022 at 13:45

5

Solved

I created an API spec from some JSON files and I am trying to test if the files validate against the API spec. There are some good tools to validate against JSON Schema, but I did not have chance...
Telltale asked 1/9, 2016 at 15:49

2

Solved

My question for jsonschema is twofold: Given { "foo": {"ar": {"a": "r"}}, "bar": "" } How do I check if the key "ar" exists inside of "foo"? And only if "ar" exists inside of "foo", how do I...
Isatin asked 24/5, 2019 at 21:9

4

Solved

Is there a way to validate a JSON structure against a JSON schema for that structure? I have looked and found JSON.Net validate but this does not do what I want. JSON.net does: JsonSchema schema ...
Klausenburg asked 23/10, 2013 at 14:13

3

Solved

I am working with data from very long, nested JSON files. Problem is, that the structure of these files is not always the same as some of them miss columns others have. I want to create a custom sc...
Mauk asked 26/10, 2021 at 7:56

3

I'm using a slightly modified version of the code from the JSON Schema FAQ to create a validator that sets default values: def extend_with_default(validator_class): validate_properties = validato...
Volitive asked 22/12, 2016 at 19:57

4

Solved

Hopefully this isn't obvious to others because I find the docs at https://json-schema.org/ to be lacking in finer details. I'm getting a block of JSON with some properties that can be null or a str...
Glen asked 26/4, 2013 at 16:43

© 2022 - 2024 — McMap. All rights reserved.