-
Notifications
You must be signed in to change notification settings - Fork 17.3k
feat(api): return uuid in POST response for dataset, chart, and dashboard #37806
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -702,7 +702,7 @@ def post(self) -> Response: | |
| return self.response_400(message=error.messages) | ||
| try: | ||
| new_model = CreateDashboardCommand(item).run() | ||
| return self.response(201, id=new_model.id, result=item) | ||
| return self.response(201, id=new_model.id, result=item, uuid=new_model.uuid) | ||
|
||
| except DashboardInvalidError as ex: | ||
| return self.response_422(message=ex.normalized_messages()) | ||
| except DashboardCreateFailedError as ex: | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -363,7 +363,7 @@ def post(self) -> Response: | |||||||||||||||||
|
|
||||||||||||||||||
| try: | ||||||||||||||||||
| new_model = CreateDatasetCommand(item).run() | ||||||||||||||||||
| return self.response(201, id=new_model.id, result=item, data=new_model.data) | ||||||||||||||||||
| return self.response(201, id=new_model.id, result=item, data=new_model.data, uuid=new_model.uuid) | ||||||||||||||||||
|
||||||||||||||||||
| return self.response(201, id=new_model.id, result=item, data=new_model.data, uuid=new_model.uuid) | |
| return self.response( | |
| 201, | |
| id=new_model.id, | |
| result=item, | |
| data=new_model.data, | |
| uuid=new_model.uuid, | |
| ) |
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.
The POST endpoint now includes a top-level
uuidin the 201 response, but the OpenAPI docstring for this endpoint still documents onlyidandresultunderresponses: 201. Please update the response schema docs to include theuuidfield so generated API docs match the actual payload.