I design API with Swagger and use Swagger UI to display them on our corporate API Design Website. I have a JSON file who contains a JSONSCHEMA with every variables I would like to use in multiples SWAGGER files.
For example, given the foo.json file containing the following schema :
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "fooooo",
"version": "2021_11",
"type": "object",
"definitions": {
"EligibilityNotification": {
"type":"object",
"properties": {
"code": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}
}
I have the following swagger file :
components:
NotificationGroup:
type: object
properties:
eligibilityNotifications:
type: array
items:
$ref: '../JSONSchemas/foo.json#/definitions/EligibilityNotification'
The relative path is correct I double checked it before creating the topic.
I have the following issue localy when I browse the swagger throught the "OpenAPI SwaggerUI preview" Visual Studio Code's pluggin :
"Unknown Type: object,null"

