Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Created February 10, 2023 16:01
Show Gist options
  • Save jlsherrill/af376f50ca7692332ab19ce01d88ee11 to your computer and use it in GitHub Desktop.
Save jlsherrill/af376f50ca7692332ab19ce01d88ee11 to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.2",
"info": {
"title": "SimpleTest",
"version": "1.0.0",
"description": ""
},
"paths": {
"/testresponses": {
"summary": "Path used to manage the list of testresponses.",
"description": "The REST endpoint/path used to list and create zero or more `TestResponse` entities. This path contains a `GET` and `POST` operation to perform the list and create tasks, respectively.",
"get": {
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TestResponse"
}
}
}
},
"description": "Successful response - returns an array of `TestResponse` entities."
}
},
"operationId": "getTestResponses",
"summary": "List All TestResponses",
"description": "Gets a list of all `TestResponse` entities."
},
"post": {
"requestBody": {
"description": "A new `TestResponse` to be created.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestResponse"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful response."
}
},
"operationId": "createTestResponse",
"summary": "Create a TestResponse",
"description": "Creates a new instance of a `TestResponse`."
}
},
"/testresponses/{testresponseId}": {
"summary": "Path used to manage a single TestResponse.",
"description": "The REST endpoint/path used to get, update, and delete single instances of an `TestResponse`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.",
"get": {
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestResponse"
}
}
},
"description": "Successful response - returns a single `TestResponse`."
}
},
"operationId": "getTestResponse",
"summary": "Get a TestResponse",
"description": "Gets the details of a single instance of a `TestResponse`."
},
"put": {
"requestBody": {
"description": "Updated `TestResponse` information.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestResponse"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "Successful response."
}
},
"operationId": "updateTestResponse",
"summary": "Update a TestResponse",
"description": "Updates an existing `TestResponse`."
},
"delete": {
"responses": {
"204": {
"description": "Successful response."
}
},
"operationId": "deleteTestResponse",
"summary": "Delete a TestResponse",
"description": "Deletes an existing `TestResponse`."
},
"parameters": [
{
"name": "testresponseId",
"description": "A unique identifier for a `TestResponse`.",
"schema": {
"type": "string"
},
"in": "path",
"required": true
}
]
}
},
"components": {
"schemas": {
"MyEnum": {
"enum": [
"immediate",
"on_demand",
"streamed"
],
"type": "string"
},
"TestResponse": {
"title": "Root Type for TestResponse",
"description": "Test Response",
"required": [
"value"
],
"type": "object",
"properties": {
"policy": {
"allOf": [
{
"$ref": "#/components/schemas/MyEnum"
}
],
"default": "immediate"
}
},
"example": {
"policy": "immediate"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment