Skip to content

Commit

Permalink
fix(example): content-type for update, id field for create (#272)
Browse files Browse the repository at this point in the history
fix incorrect examples:

- incorrect content type for update.
- id field for create was missing.
- adding a contact field.

fixes #271
  • Loading branch information
toumorokoshi authored Jan 21, 2025
1 parent 8e34b04 commit 0af60aa
Showing 1 changed file with 51 additions and 8 deletions.
59 changes: 51 additions & 8 deletions aep/general/example.oas.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
'openapi': '3.1.0',
'servers': [{ 'url': 'http://localhost:8081' }],
'info':
{
'title': 'bookstore.example.com',
'description': 'An API for bookstore.example.com',
'version': 'version not set',
'contact': { 'name': 'API support', 'email': '[email protected]' },
},
'openapi': '3.1.0',
'servers': [{ 'url': 'http://localhost:8081' }],
'paths':
{
'/isbns':
Expand Down Expand Up @@ -61,6 +62,14 @@
{
'description': 'Create method for isbn',
'operationId': 'CreateIsbn',
'parameters':
[
{
'name': 'id',
'in': 'query',
'schema': { 'type': 'string' },
},
],
'responses':
{
'200':
Expand Down Expand Up @@ -137,6 +146,16 @@
'in': 'query',
'schema': { 'type': 'string' },
},
{
'name': 'skip',
'in': 'query',
'schema': { 'type': 'integer' },
},
{
'name': 'filter',
'in': 'query',
'schema': { 'type': 'string' },
},
],
'responses':
{
Expand Down Expand Up @@ -171,6 +190,14 @@
{
'description': 'Create method for publisher',
'operationId': 'CreatePublisher',
'parameters':
[
{
'name': 'id',
'in': 'query',
'schema': { 'type': 'string' },
},
],
'responses':
{
'200':
Expand Down Expand Up @@ -251,7 +278,7 @@
'description': 'Successful response',
'content':
{
'application/json':
'application/merge-patch+json':
{
'schema':
{ '$ref': '#/components/schemas/publisher' },
Expand All @@ -263,7 +290,7 @@
{
'content':
{
'application/json':
'application/merge-patch+json':
{
'schema':
{ '$ref': '#/components/schemas/publisher' },
Expand Down Expand Up @@ -412,6 +439,11 @@
'required': true,
'schema': { 'type': 'string' },
},
{
'name': 'id',
'in': 'query',
'schema': { 'type': 'string' },
},
],
'responses':
{
Expand Down Expand Up @@ -502,7 +534,7 @@
'description': 'Successful response',
'content':
{
'application/json':
'application/merge-patch+json':
{
'schema':
{ '$ref': '#/components/schemas/book' },
Expand All @@ -514,7 +546,7 @@
{
'content':
{
'application/json':
'application/merge-patch+json':
{ 'schema': { '$ref': '#/components/schemas/book' } },
},
'required': true,
Expand Down Expand Up @@ -676,6 +708,11 @@
'required': true,
'schema': { 'type': 'string' },
},
{
'name': 'id',
'in': 'query',
'schema': { 'type': 'string' },
},
],
'responses':
{
Expand Down Expand Up @@ -819,14 +856,20 @@
'application/json':
{
'schema':
{ '$ref': '#/components/schemas/book' },
{
'type': 'object',
'properties':
{ 'success': { 'type': 'boolean' } },
'x-aep-field-numbers': { '0': 'success' },
},
},
},
},
},
'requestBody':
{
'content': { 'application/json': { 'schema': {} } },
'content':
{ 'application/json': { 'schema': { 'type': 'object' } } },
'required': true,
},
},
Expand Down

0 comments on commit 0af60aa

Please sign in to comment.