Browse Source

v0.9

master
Nicolas Massé 5 years ago
parent
commit
6a11156c55
  1. 59
      openapi.json

59
openapi.json

@ -2,12 +2,8 @@
"openapi": "3.0.2", "openapi": "3.0.2",
"info": { "info": {
"title": "Library API", "title": "Library API",
"version": "1.0.0", "version": "0.9.0",
"description": "A simple API for managing authors and books.", "description": "A simple API for managing authors and books"
"contact": {
"name": "Nicolas MASSE",
"email": "nmasse@redhat.com"
}
}, },
"paths": { "paths": {
"/authors": { "/authors": {
@ -25,7 +21,7 @@
} }
}, },
"examples": { "examples": {
"vhugo": { "all_authors": {
"value": [ "value": [
{ {
"id": "vhugo", "id": "vhugo",
@ -167,16 +163,6 @@
"items": { "items": {
"$ref": "#/components/schemas/Book" "$ref": "#/components/schemas/Book"
} }
},
"examples": {
"all-books": {
"value": [
{
"title": "Les Misérables",
"publish-date": "01-01-1862"
}
]
}
} }
} }
}, },
@ -213,36 +199,12 @@
"summary": "Path used to manage a single Book.", "summary": "Path used to manage a single Book.",
"description": "The REST endpoint/path used to get, update, and delete single instances of an `Book`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.", "description": "The REST endpoint/path used to get, update, and delete single instances of an `Book`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.",
"get": { "get": {
"parameters": [
{
"examples": {
"les-miserables": {
"value": "les-miserables"
}
},
"name": "bookId",
"description": "A unique identifier for a `Book`.",
"schema": {
"type": "string"
},
"in": "path",
"required": true
}
],
"responses": { "responses": {
"200": { "200": {
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/Book" "$ref": "#/components/schemas/Book"
},
"examples": {
"les-miserables": {
"value": {
"title": "Les Misérables",
"publish-date": "01-01-1862"
}
}
} }
} }
}, },
@ -345,19 +307,6 @@
"publish-date": "01-01-1862" "publish-date": "01-01-1862"
} }
} }
},
"securitySchemes": {
"api-key": {
"type": "apiKey",
"name": "api-key",
"in": "header"
}
}
},
"security": [
{
"api-key": [
]
} }
] }
} }
Loading…
Cancel
Save