How do I require one field or another or (one of two others) but not all of them?

I am having trouble coming up with a JSON schema that will validate if the JSON contains either: one field only another field only (one of two other fields) only but not to match when multiples...

JSON schema $ref does not work for relative path

I have 3 schemas: child schema: { "title": "child_schema", "type": "object", "properties": { "wyx":{ "type": "number" } }, "additionalProperties": false, ...

Dictionary-like JSON schema

I have a json object that can contain any number of nested objects with certain specification, for example: { "Bob": { "age": "42", "gender": "male" }, "Alice": { "age": "37", ...

How to specify a property can be null or a reference with swagger

How to specify a property as null or a reference? discusses how to specify a property as null or a reference using jsonschema. I'm looking to do the same thing with swagger. To recap the answer to...

Generate fixed value in json-schema faker

I am trying to generate a type property on an object, with a default value, I read the documentation and found nothing related to giving a fixed value to a property. You can view a link in the...

How to validate JSON Schema according to Draft v4 using JSON.NET Schema or NJSONSchema?

I have been looking into both JSON.NET Schema and NJsonSchema ... Both dont seem to have any propert / method that identifies if JSON Schema is a valid JSON Schema and in accordance with draft v4...

How to resolve JSON Schema $ref to file in parent directory

I have some some legacy draft-04 schema that I am trying to get to resolve a $ref to a file in parent directory. Several attempts at various dotted paths have failed to resolve this ref for...

Generating PDF from json and json-schema

We're currently using Alpaca Forms to generate forms which we use to edit data stored in json for our application. We're now looking for a way to, server side, generate PDF documents, using...

JSONSchema local self-reference (recursion)

How can I reference a schema (B in this case) from itself no matter where it is nested? I would like to be able to validate against schema A and against schema B. E.g. from jsonschema import...

ModuleNotFoundError: No module named 'plotly'

After reading all the existing post related to this issue, i still did not manage to fix it. ModuleNotFoundError: No module named 'plotly' I have tried all the following: pip3 install...

How to set up local file references in python-jsonschema document?

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...

Python: why do I get an error when I import geopandas?

I try to import geopandas in my jupyter notebook. import geopandas as gp and I get the following error: ImportError:...

Jupyter Notebook - Cannot Connect to Kernel

I've tried installing jupyter notebook using pip3 install jupyter. Every time i launch a new jupyter notebook, the notebook is unable to connect to the kernel. See screenshot below Attaching my...

WEBP support not installed error with Pillow included in Anaconda

I have written a small code to open webp image in the Anaconda prompt. from PIL import Image im = Image.open('test.webp') It causes the following...

"AssertionError: Torch not compiled with CUDA enabled" in spite upgrading to CUDA version

I figured out this is a popular question, but still I couldn't find a solution for that. I'm trying to run a simple repo Here which uses PyTorch. Although I just upgraded my Pytorch to the latest...

A single source of truth for API request/response shapes, including JSON schema, TypeScript types, and runtime validators?

I'm writing a typical Node.js REST service with endpoints that receive JSON input (as POST bodies) and return JSON responses. I want these three things: JSON schemas defining the shapes of...

flask run does not work when using flask restplus

I am new to python and flask. I want to use flask-restplus. On using flask restplus, I am unable to start my app with "flask run" command. However, it does start when I run it as module "python3...

ImportError: cannot import name 'rcParams' from 'matplotlib'

I have tried to uninstall and reinstall matplotlib in my tf-gpu enviornment I made but I keep getting this error: ImportError: cannot import name 'rcParams' from 'matplotlib' This is the entire...

user-friendly error message using ajv json schema validator

Assuming I have the schema & JSON: JSON Schema: const schema = { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [ "countries" ], "definitions": { ...

Node js mosca broker error: Expected `schema` to be an object or boolean

I have created a simple broker: var mosca = require("mosca"); var settings = { port: 1883, }; var server = new mosca.Server(settings); server.on("ready", function () { ...

fastify fail to serialize response schema with fluent json schema FST_ERR_SCH_SERIALIZATION_BUILD data.properties should be object

this is my route app.patch( `/${root}/item/:itemId`, { schema: item_schema, }, items // controller ); and this is my schema file import schema from "fluent-json-schema"; const body =...

add 'description' to Pydantic schema when using pydantic.dataclasses

Pydantic supports generating OpenApi/jsonschema schemas. When using Pydantic's BaseModel to define models one can add description and title to the resultant json/yaml spec. class...

Using apache-airflow-providers-snowflake on airflow (no module named Snowflake)

I have installed package apache-airflow-providers-snowflake on airflow on docker and i am getting error No module named Snowflake Please refer attachment (check the error mentioned for the...

How to Read data from kafka topic with different schema (has some optional objects) in structured streaming

i have data coming in kafka topic which has an optional object , and since its optional i am missing those records when reading with a defined schema ex : schema i have : val schema =new...

BROWNIE - installation issue

I am trying to install Brownie and get the following error " PS C:\Python39> pip install eth-brownie Collecting eth-brownie Using cached eth_brownie-1.14.6-py3-none-any.whl (207 kB) ...

Cannot pip install mediapipe on Macos M1

Hello fellows I'm using mac air with M1 chip My env sets like (CV) san  ~/work/python  conda list # packages in environment at /Users/san/miniforge3/envs/CV: # # Name ...

PIP failed to build package cytoolz

I'm trying to install eth-brownie using 'pipx install eth-brownie' but I get an error saying pip failed to build package: cytoolz Some possibly relevant errors from pip install: ...

pycharm error happening at random time: Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

I am working with pycharm community on a tensorflow model with keras backend, sometimes this error appears in a random time, specially after I call pyplot and close the window: Exception ignored...

reference a HTML tag with javascript that was generated from django json schema

I am trying to reference a HTML tag that is generated by a django's django_jsonforms link JSON Schema link via javascript to dynamically update the form. For example 2 dropdowns in a form, if you...

composer and laravel 7 not working with php 8.1

Today i updated php in xampp to 8.1.0 after that all Laravel projects stopped in localhost. So, after update composer.json from to "php": "^7.3|^8.0", I see the composer have problem like this...