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

Process swagger file cross reference when generating API review #7438

Merged

Conversation

praveenkuttappan
Copy link
Member

Swagger file refers to a definition in another swagger file and sometimes this definition in second swagger file might have a schema reference to another definition within same file and this reference will be a local reference. API review parser incorrectly searches for this local reference in first swagger file instead of second file where it's defined.

PR has the fix to correctly refer the swagger file based on the parent reference if current reference path is local.

For e.g. data.json has a reference to 202response definition which is in common.json and 202response has a reference to longrunningoperationresult schema using local reference #LongRunningOperationResult and it's defined in common.json. We need to make sure parser refers common.json when processing #LongRunningOperationResult schema instead of data.json.

@praveenkuttappan praveenkuttappan requested a review from a team as a code owner December 12, 2023 14:34
@praveenkuttappan praveenkuttappan self-assigned this Dec 12, 2023
@praveenkuttappan praveenkuttappan added APIView Central-EngSys This issue is owned by the Engineering System team. labels Dec 12, 2023
@praveenkuttappan
Copy link
Member Author

/azp run tools - swaggerapiparser

Copy link

No pipelines are associated with this pull request.

@praveenkuttappan
Copy link
Member Author

/azp run tools - SwaggerApiParser

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@maririos
Copy link
Member

Are there any test we can add for this?

@praveenkuttappan praveenkuttappan merged commit 8240399 into Azure:main Dec 12, 2023
13 checks passed
@praveenkuttappan praveenkuttappan deleted the swagger_parser_reference_fix branch December 12, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIView Central-EngSys This issue is owned by the Engineering System team.
Projects
Status: ✅ Done
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants