Skip to content
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

Cleanup Swagger Transforms and Customizations in Metrics Advisor #33874

Merged
merged 5 commits into from
Mar 14, 2023

Conversation

samvaity
Copy link
Member

@samvaity samvaity commented Mar 6, 2023

This PR makes sure Metrics advisor swagger is updated with the public rest-api specs and also removes outdated customizations that are not applicable anymore.;

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-metricsadvisor

@samvaity samvaity marked this pull request as ready for review March 9, 2023 01:35
@samvaity samvaity requested a review from anuchandy as a code owner March 9, 2023 01:35
@samvaity samvaity requested a review from srnagar March 9, 2023 02:20
@samvaity samvaity self-assigned this Mar 9, 2023
Comment on lines +751 to +755
DataFeedIngestionStatus dataFeedIngestionStatus = new DataFeedIngestionStatus();
DataFeedIngestionStatusHelper.setMessage(dataFeedIngestionStatus, ingestionStatus.getMessage());
DataFeedIngestionStatusHelper.setIngestionStatusType(dataFeedIngestionStatus, IngestionStatusType.fromString(toStringOrNull(ingestionStatus.getStatus())));
DataFeedIngestionStatusHelper.setTimestamp(dataFeedIngestionStatus, ingestionStatus.getTimestamp());
return dataFeedIngestionStatus;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? The DataFeedIngestionStatus should be correctly serialized and we don't need accessors to make it public. What's the difference between the DataFeedIngestionStatus in implementation package and the one in public package?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is we need the DataFeedIngestionStatus in admin.models and not models. I believe earlier it was manually moved. But to make the swagger work as is without manual modifications we needed this transform.
are there any other options we can do?

@samvaity samvaity requested a review from srnagar March 10, 2023 23:49
@samvaity samvaity merged commit 158c158 into Azure:main Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants