"description":"A simple API for managing authors and books.",
"contact":{
"contact":{
"name":"Eric Wittmann",
"name":"Nicolas Massé",
"email":"eric.wittmann@redhat.com"
"email":"nmasse@redhat.com"
},
"license":{
"name":"Mozilla 2.0",
"url":"https://www.mozilla.org/en-US/MPL/2.0/"
}
}
},
},
"paths":{
"paths":{
@ -29,17 +24,12 @@
}
}
},
},
"examples":{
"examples":{
"authors":{
"all-authors":{
"value":[
"value":[
{
{
"id":"mpagnol",
"id":"vhugo",
"name":"Marcel Pagnol",
"name":"Victor Hugo",
"dob":"1895-02-28"
"dob":"26-02-1885"
},
{
"id":"ezola",
"name":"Émile Zola",
"dob":"1840-04-02"
}
}
]
]
}
}
@ -79,7 +69,21 @@
"summary":"Path used to manage a single Author.",
"summary":"Path used to manage a single Author.",
"description":"The REST endpoint/path used to get, update, and delete single instances of an `Author`. 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 `Author`. This path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete tasks, respectively.",
"get":{
"get":{
"tags":[
"parameters":[
{
"examples":{
"vhugo":{
"value":"vhugo"
}
},
"name":"authorId",
"description":"A unique identifier for a `Author`.",
"schema":{
"type":"string"
},
"in":"path",
"required":true
}
],
],
"responses":{
"responses":{
"200":{
"200":{
@ -87,13 +91,19 @@
"application/json":{
"application/json":{
"schema":{
"schema":{
"$ref":"#/components/schemas/Author"
"$ref":"#/components/schemas/Author"
},
"examples":{
"vhugo":{
"value":{
"id":"vhugo",
"name":"Victor Hugo",
"dob":"26-02-1885"
}
}
}
}
}
}
},
},
"description":"Successful response - returns a single `Author`."
"description":"Successful response - returns a single `Author`."
},
"404":{
"$ref":"#/components/responses/NotFound"
}
}
},
},
"operationId":"getAuthor",
"operationId":"getAuthor",
@ -115,9 +125,6 @@
"responses":{
"responses":{
"202":{
"202":{
"description":"Successful response."
"description":"Successful response."
},
"404":{
"$ref":"#/components/responses/NotFound"
}
}
},
},
"operationId":"updateAuthor",
"operationId":"updateAuthor",
@ -128,9 +135,6 @@
"responses":{
"responses":{
"204":{
"204":{
"description":"Successful response."
"description":"Successful response."
},
"404":{
"$ref":"#/components/responses/NotFound"
}
}
},
},
"operationId":"deleteAuthor",
"operationId":"deleteAuthor",
@ -162,6 +166,16 @@
"items":{
"items":{
"$ref":"#/components/schemas/Book"
"$ref":"#/components/schemas/Book"
}
}
},
"examples":{
"all-books":{
"value":[
{
"title":"Les Misérables",
"publish-date":"01-01-1862"
}
]
}
}
}
}
}
},
},
@ -198,12 +212,36 @@
"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`.",