Allow "$schema" via schema.json
See original GitHub issueThe schema should allow the “$schema” element in the referencing document.
Sample Document
{
"$schema": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v2.0/schema.json",
"swagger": "2.0",
"info": {
"title": "My Service API",
"version": "0.0.1"
},
"paths": {}
}
“Property $schema is not allowed.”
{
"resource": "/Users/gpalacino/Source/play/service/service-api/openapi.json",
"owner": "_generated_diagnostic_collection_name_#0",
"code": null,
"severity": 4,
"message": "Property $schema is not allowed.",
"startLineNumber": 2,
"startColumn": 3,
"endLineNumber": 2,
"endColumn": 12
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Getting Started Step-By-Step - JSON Schema
To start a schema definition, let's begin with a basic JSON schema. We start with four properties called keywords which are expressed as...
Read more >JSON Schema Examples Tutorial - MongoDB
This JSON schema tutorial will walk through the basics of setting JSON schema standards and using schema for validation in MongoDB Atlas and...
Read more >JSON - Schema - Tutorialspoint
JSON - Schema, JSON Schema is a specification for JSON based format for defining the structure of JSON data. It was written under...
Read more >How to Validate Your JSON Using JSON Schema
JSON Schema is a JSON-based format for defining the structure of JSON data. It provides a contract for what JSON data is required...
Read more >Introduction to JSON Schema in Java - Baeldung
JSON Schema is a declarative language for validating the format and structure of a JSON Object. It allows us to specify the number...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
$schema
is a JSON Schema keyword, and OAS is not, itself a JSON Schema (it is a document that contains JSON Schemas within it). While some people do use a$schema
property in JSON documents the same way that JSON Schema uses it, this is not actually any sort of standard and is, IMHO, more confusing than helpful.[EDIT: I misread this and didn’t realize it was about putting
$schema
at the root of OAS itself. I’ve taken out what I wrote before and will put that in a separate issue.]