-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea0a2d9
commit 8fe6168
Showing
11 changed files
with
324 additions
and
36 deletions.
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
33 changes: 33 additions & 0 deletions
33
metadata_service/api/swagger_doc/common/description_get.yml
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,33 @@ | ||
Gets the description of a resource | ||
--- | ||
tags: | ||
- 'table' | ||
- 'description' | ||
parameters: | ||
- name: id | ||
in: path | ||
type: string | ||
schema: | ||
type: string | ||
required: true | ||
example: 'dynamo://gold.test_schema/test_table2' | ||
responses: | ||
200: | ||
description: 'Table description' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Description' | ||
description: 'Resource description' | ||
404: | ||
description: 'Resource not found' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' | ||
500: | ||
description: 'Internal server error' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' |
33 changes: 33 additions & 0 deletions
33
metadata_service/api/swagger_doc/common/description_put.yml
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,33 @@ | ||
Upserts description of a resource | ||
--- | ||
tags: | ||
- 'table' | ||
- 'dashboard' | ||
parameters: | ||
- name: id | ||
in: path | ||
type: string | ||
schema: | ||
type: string | ||
required: true | ||
example: 'dynamo://gold.test_schema/test_table2' | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Description' | ||
description: Resource description | ||
required: true | ||
responses: | ||
200: | ||
description: 'Empty response' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/EmptyResponse' | ||
404: | ||
description: 'Resource not found' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorResponse' |
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,13 @@ | ||
import attr | ||
from marshmallow_annotations.ext.attrs import AttrsSchema | ||
|
||
|
||
@attr.s(auto_attribs=True, kw_only=True) | ||
class Description: | ||
description: str = attr.ib() | ||
|
||
|
||
class DescriptionSchema(AttrsSchema): | ||
class Meta: | ||
target = Description | ||
register_as_scheme = True |
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,6 @@ | ||
from enum import Enum, auto | ||
|
||
|
||
class ResourceType(Enum): | ||
Table = auto() | ||
Dashboard = auto() |
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
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
Oops, something went wrong.