Skip to content

Instantly share code, notes, and snippets.

@thiagoarrais
Created October 9, 2019 17:26
Show Gist options
  • Save thiagoarrais/1ceb28882eba3bd333e775de0ce69648 to your computer and use it in GitHub Desktop.
Save thiagoarrais/1ceb28882eba3bd333e775de0ce69648 to your computer and use it in GitHub Desktop.
Companion gist for quen2404/openapi-diff PR #104
{
"openapi" : "3.0.1",
"info": {
"title": "My API"
},
"paths" : {
"/api/v1/addons" : {
"get" : {
"operationId" : "listAddons",
"parameters" : [ {
"name" : "name",
"in" : "query",
"schema" : {
"type" : "string"
}
}, {
"name" : "fields",
"in" : "query",
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"422" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Message"
}
}
}
}
}
}
}
}
},
"components" : {
"schemas" : {
"Message" : {
"type" : "object",
"properties" : {
"severity" : {
"type" : "string",
"enum" : [ "ERROR", "ALERT", "INFO", "WARN", "FATAL" ]
},
"originConstraint" : {
"type" : "object",
"properties" : {
"messageTemplate" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
},
"message" : {
"type" : "string"
}
}
}
}
}
}
{
"openapi" : "3.0.1",
"info": {
"title": "My API"
},
"paths" : {
"/api/v1/addons" : {
"get" : {
"operationId" : "listAddons",
"parameters" : [ {
"name" : "name",
"in" : "query",
"schema" : {
"type" : "string"
}
}, {
"name" : "fields",
"in" : "query",
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"422" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Message"
}
}
}
}
}
}
}
}
},
"components" : {
"schemas" : {
"Message" : {
"type" : "object",
"properties" : {
"severity" : {
"type" : "string",
"enum" : [ "ERROR", "ALERT", "INFO", "WARN", "FATAL" ]
},
"originConstraint" : {
"type" : "object",
"properties" : {
"messageTemplate" : {
"type" : "string"
},
"leafBean" : {
"type" : "object"
},
"message" : {
"type" : "string"
}
}
},
"message" : {
"type" : "string"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment