Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suggestion: String JSON Schemas as shortcut for $ref #1078

Open
Labels
Type: Enhancement core proposalInitial discussion of a new idea. A project will be created once a proposal document is created.
@moander

Description

A schema is either an object or a boolean. What if there was a third option (string) that is a shortcut for $ref?

So instead of models like this

{
 "$id": "https://example.com/schemas/my-model.json",
 "properties": {
 "foo": {
 "$ref": "shared-type1.json"
 },
 "bar": {
 "$ref": "shared-type2.json"
 },
 "jau":{
 "type": "string"
 },
 "hei":{
 "type": "string"
 }
 }
}

You get

{
 "$id": "https://example.com/schemas/my-model.json",
 "properties": {
 "foo": "shared-type1.json",
 "bar": "shared-type2.json",
 "jau": "#string",
 "hei": "#string"
 },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Enhancement core proposalInitial discussion of a new idea. A project will be created once a proposal document is created.

    Type

    No type

    Projects

    Status

    In Discussion

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /