Created
July 17, 2024 12:46
-
-
Save sashalikesplanes/bd015e9538596c1373f48d9ef8ce69ff to your computer and use it in GitHub Desktop.
test2.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/hyper-schema#", | |
"type": "object", | |
"definitions": { | |
"user": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
} | |
}, | |
"required": ["id", "name"] | |
} | |
}, | |
"properties": { | |
"user": { | |
"$ref": "#/definitions/user" | |
} | |
}, | |
"links": [ | |
{ | |
"rel": "create", | |
"href": "/users", | |
"method": "POST", | |
"title": "Create User", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"userName": { | |
"type": "string" | |
}, | |
"userId": { | |
"type": "string" | |
} | |
}, | |
"required": ["userName", "userId"] | |
}, | |
"targetSchema": { | |
"$ref": "#/definitions/user" | |
}, | |
"mapping": { | |
"userName": "name", | |
"userId": "id" | |
} | |
}, | |
{ | |
"rel": "self", | |
"href": "/users/{id}", | |
"method": "GET", | |
"title": "Get User", | |
"targetSchema": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"id": { | |
"type": "string" | |
} | |
}, | |
"required": ["name", "id"] | |
}, | |
"mapping": { | |
"name": "name", | |
"id": "id" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment