-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAS examples for standard methods #215
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
openapi: 3.0.3 | ||
info: | ||
title: Library | ||
version: 1.0.0 | ||
paths: | ||
/publishers/{publisherId}/books/{bookId}: | ||
parameters: | ||
- name: publisherId | ||
in: path | ||
description: The publisher to list books for. | ||
required: true | ||
schema: | ||
type: string | ||
- name: bookId | ||
in: path | ||
description: The name of the book. | ||
required: true | ||
schema: | ||
type: string | ||
post: | ||
operationId: createBook | ||
description: Create a Book | ||
requestBody: | ||
description: The book that is being created. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Book' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Book' | ||
components: | ||
schemas: | ||
Book: | ||
x-aep-resource: | ||
singular: book | ||
plural: books | ||
patterns: | ||
- 'publishers/{publisher}/books/{book}' | ||
description: A representation of a single book. | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
description: | | ||
The name of the book. | ||
Format: publishers/{publisher}/books/{book} | ||
isbn: | ||
type: string | ||
description: | | ||
The ISBN (International Standard Book Number) for this book. | ||
title: | ||
type: string | ||
description: The title of the book. | ||
authors: | ||
type: array | ||
items: | ||
type: string | ||
description: The author or authors of the book. | ||
rating: | ||
type: number | ||
description: The rating assigned to the book. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
openapi: 3.0.3 | ||
info: | ||
title: Library | ||
version: 1.0.0 | ||
paths: | ||
/publishers/{publisherId}/books/{bookId}: | ||
parameters: | ||
- name: publisherId | ||
in: path | ||
description: The publisher to list books for. | ||
required: true | ||
schema: | ||
type: string | ||
- name: bookId | ||
in: path | ||
description: The name of the book. | ||
required: true | ||
schema: | ||
type: string | ||
post: | ||
operationId: createBook | ||
description: Create a Book | ||
requestBody: | ||
description: The book that is being created. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Book' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Operation' | ||
components: | ||
schemas: | ||
Operation: | ||
description: The status of a long running operation. | ||
properties: | ||
path: | ||
type: string | ||
description: | ||
The server-assigned path, which is only unique within the same | ||
service that originally returns it. | ||
done: | ||
type: boolean | ||
description: >- | ||
If the value is false, it means the operation is still in progress. | ||
If true, the operation is completed, and either response or error | ||
is available. | ||
error: | ||
$ref: '#/components/schemas/Error' | ||
metadata: | ||
type: object | ||
description: >- | ||
Service-specific metadata associated with the operation. It | ||
typically contains progress information and common metadata such as | ||
create time. Some services might not provide such metadata. Any | ||
method that returns a long-running operation should document the | ||
metadata type, if any. | ||
response: | ||
type: object | ||
description: >- | ||
The normal response of the operation in case of success. Depending | ||
on the method, this may be the empty object, the resource on which | ||
the operation is performed, or a custom response. | ||
required: | ||
- path | ||
- done | ||
|
||
Book: | ||
x-aep-resource: | ||
singular: book | ||
plural: books | ||
patterns: | ||
- 'publishers/{publisher}/books/{book}' | ||
description: A representation of a single book. | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
description: | | ||
The name of the book. | ||
Format: publishers/{publisher}/books/{book} | ||
isbn: | ||
type: string | ||
description: | | ||
The ISBN (International Standard Book Number) for this book. | ||
title: | ||
type: string | ||
description: The title of the book. | ||
authors: | ||
type: array | ||
items: | ||
type: string | ||
description: The author or authors of the book. | ||
rating: | ||
type: number | ||
description: The rating assigned to the book. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
openapi: 3.0.3 | ||
info: | ||
title: Library | ||
version: 1.0.0 | ||
paths: | ||
/publishers/{publisherId}/books/{bookId}: | ||
parameters: | ||
- name: publisherId | ||
in: path | ||
description: The publisher to list books for. | ||
required: true | ||
schema: | ||
type: string | ||
- name: bookId | ||
in: path | ||
description: The name of the book. | ||
required: true | ||
schema: | ||
type: string | ||
- name: updateMask | ||
in: query | ||
description: The list of fields that should be updated. | ||
required: false | ||
schema: | ||
type: string | ||
patch: | ||
operationId: updateBook | ||
description: Update a Book | ||
requestBody: | ||
description: The book that is being updated. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Book' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Book' | ||
components: | ||
schemas: | ||
Book: | ||
x-aep-resource: | ||
singular: book | ||
plural: books | ||
patterns: | ||
- 'publishers/{publisher}/books/{book}' | ||
description: A representation of a single book. | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
description: | | ||
The name of the book. | ||
Format: publishers/{publisher}/books/{book} | ||
isbn: | ||
type: string | ||
description: | | ||
The ISBN (International Standard Book Number) for this book. | ||
title: | ||
type: string | ||
description: The title of the book. | ||
authors: | ||
type: array | ||
items: | ||
type: string | ||
description: The author or authors of the book. | ||
rating: | ||
type: number | ||
description: The rating assigned to the book. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other examples skip the full resource definition. Since you've added the full resource,
name
bepath
? I findpath
in AEP-122 and AEP-148 and no references toname
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment for the
Book
component schemas in the other examples.