-
Notifications
You must be signed in to change notification settings - Fork 0
All Stand APIs #14
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
Merged
Merged
All Stand APIs #14
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
64fd87f
feat: correct store-stand relationship
petrubraha 0e4f95b
removed bad files
petrubraha ffc2b7a
feat: added resource to the service
petrubraha 3ff883b
feat: stand APIs
petrubraha 4ec94cc
fix: added storeId references in the create and list operations
petrubraha 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 hidden or 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,87 @@ | ||
| $version: "2" | ||
|
|
||
| namespace com.shopping.inandout.stand | ||
|
|
||
| use com.shopping.inandout#InternalServerError | ||
| use com.shopping.inandout#InvalidInputError | ||
| use com.shopping.inandout#PositiveDouble | ||
| use com.shopping.inandout#ResourceAlreadyExistsError | ||
| use com.shopping.inandout#ResourceNotFoundError | ||
| use com.shopping.inandout#UUID | ||
|
|
||
| resource Stand { | ||
| identifiers: { | ||
| storeId: UUID | ||
| standId: UUID | ||
| } | ||
| properties: { | ||
| articleId: UUID | ||
| edgeId: UUID | ||
| sourceNodeDistance: PositiveDouble | ||
| createdAt: Timestamp | ||
| updatedAt: Timestamp | ||
| } | ||
| create: CreateStand | ||
| read: GetStand | ||
| list: ListStands | ||
| update: UpdateStand | ||
| delete: DeleteStand | ||
| } | ||
|
|
||
| @http(method: "POST", uri: "/stores/{storeId}/stands") | ||
| operation CreateStand { | ||
| input: CreateStandInput | ||
| output: StandSummary | ||
| errors: [ | ||
| InvalidInputError | ||
| ResourceAlreadyExistsError | ||
| InternalServerError | ||
| ] | ||
| } | ||
|
|
||
| @readonly | ||
| @http(method: "GET", uri: "/stores/{storeId}/stands/{standId}") | ||
| operation GetStand { | ||
| input: GetStandInput | ||
| output: StandSummary | ||
| errors: [ | ||
| InvalidInputError | ||
| ResourceNotFoundError | ||
| InternalServerError | ||
| ] | ||
| } | ||
|
|
||
| @readonly | ||
| @paginated | ||
| @http(method: "GET", uri: "/stores/{storeId}/stands") | ||
| operation ListStands { | ||
| input: ListStandsInput | ||
| output: StandSummaries | ||
| errors: [ | ||
| InvalidInputError | ||
| InternalServerError | ||
| ] | ||
| } | ||
|
|
||
| @http(method: "PATCH", uri: "/stores/{storeId}/stands/{standId}") | ||
| operation UpdateStand { | ||
| input: UpdateStandInput | ||
| output: StandSummary | ||
| errors: [ | ||
| InvalidInputError | ||
| ResourceNotFoundError | ||
| InternalServerError | ||
| ] | ||
| } | ||
|
|
||
| @idempotent | ||
| @http(method: "DELETE", uri: "/stores/{storeId}/stands/{standId}") | ||
| operation DeleteStand { | ||
| input: DeleteStandInput | ||
| output: StandSummary | ||
| errors: [ | ||
| InvalidInputError | ||
| ResourceNotFoundError | ||
| InternalServerError | ||
| ] | ||
| } |
This file contains hidden or 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 @@ | ||
| $version: "2" | ||
|
|
||
| namespace com.shopping.inandout.stand | ||
|
|
||
| use com.shopping.inandout#InputPagination | ||
| use com.shopping.inandout#PositiveDouble | ||
| use com.shopping.inandout#UUID | ||
|
|
||
| structure CreateStandInput { | ||
| @required | ||
| @httpLabel | ||
| storeId: UUID | ||
|
|
||
| @required | ||
| articleId: UUID | ||
|
|
||
| @required | ||
| edgeId: UUID | ||
|
|
||
| sourceNodeDistance: PositiveDouble | ||
| } | ||
|
|
||
| structure GetStandInput { | ||
| @required | ||
| @httpLabel | ||
| storeId: UUID | ||
|
|
||
| @required | ||
| @httpLabel | ||
| standId: UUID | ||
| } | ||
|
|
||
| structure ListStandsInput with [InputPagination] { | ||
| @required | ||
| @httpLabel | ||
| storeId: UUID | ||
|
|
||
| @httpQuery("edgeId") | ||
| edgeId: UUID | ||
|
|
||
| @httpQuery("articleId") | ||
| articleId: UUID | ||
| } | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| structure UpdateStandInput { | ||
| @required | ||
| @httpLabel | ||
| storeId: UUID | ||
|
|
||
| @required | ||
| @httpLabel | ||
| standId: UUID | ||
|
|
||
| edgeId: UUID | ||
|
|
||
| sourceNodeDistance: PositiveDouble | ||
| } | ||
|
|
||
| structure DeleteStandInput { | ||
| @required | ||
| @httpLabel | ||
| storeId: UUID | ||
|
|
||
| @required | ||
| @httpLabel | ||
| standId: UUID | ||
| } | ||
This file contains hidden or 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,37 @@ | ||
| $version: "2" | ||
|
|
||
| namespace com.shopping.inandout.stand | ||
|
|
||
| use com.shopping.inandout#OutputPagination | ||
| use com.shopping.inandout#PositiveDouble | ||
| use com.shopping.inandout#UUID | ||
|
|
||
| structure StandSummary { | ||
| @required | ||
| storeId: UUID | ||
|
|
||
| @required | ||
| standId: UUID | ||
|
|
||
| @required | ||
| articleId: UUID | ||
|
|
||
| @required | ||
| edgeId: UUID | ||
|
|
||
| sourceNodeDistance: PositiveDouble | ||
|
|
||
| @required | ||
| createdAt: Timestamp | ||
|
|
||
| @required | ||
| updatedAt: Timestamp | ||
| } | ||
|
|
||
| list StandSummaryList { | ||
| member: StandSummary | ||
| } | ||
|
|
||
| structure StandSummaries with [OutputPagination] { | ||
| tokens: StandSummaryList | ||
| } |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.