-
Notifications
You must be signed in to change notification settings - Fork 55
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
oav generate-examples generated min and max sets with same title #935
Comments
Still seeing this issue, which is requiring us to manually update all our generated examples. |
+1 Still seeing this issue. When I use the tool with my TypeSpec project in azure-rest-api-specs to auto-generate examples, validation fails (locally when running |
@dargilco: Can you please add instructions to reproduce the issue? |
Repro steps:
Look at any generated _MaximumSet and _MinimumSet swagger example, and notice they have the same value for "title" at the top. If you try to commit those files to a TypeSpec PR, the pipeline will error out pointing out all the titles that are used in more than one example swagger. I don't know of an easy way right now to show this error locally. |
Also, unrealted, note that I need to run the |
Working on a fix |
Thank you @mikeharder, I appreciate it! |
- Fixes #935 - Uses unique titles when first generating examples - Still has unrelated bugs where title can be changed when updating existing examples
The generated examples have the same title value for both the min and max set for every operation. So, the
cadl compile
links (with thex-ms-examples
) just one of them in the generated swagger as the other one gets override.Both the titles in the min and the max set example files should have different titles (maybe with a suffix like _min or _max) so that the CADL links them properly to the swagger during compilation.
The text was updated successfully, but these errors were encountered: