@hey-api/json-schema-ref-parser
Version:
Parse, Resolve, and Dereference JSON Schema $ref pointers
47 lines (46 loc) • 982 B
JSON
{
"openapi": "3.1.0",
"info": {
"title": "Sample API",
"version": "1.0.0"
},
"paths": {
"/foo": {
"get": {
"summary": "Get foo",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"bar": {
"type": "string"
}
}
}
}
}
}
}
},
"post": {
"summary": "Create foo",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1foo/get/responses/200/content/application~1json/schema"
}
}
}
}
}
}
}
}
}