azure-rest-api-specs
azure-rest-api-specs copied to clipboard
Fixed invalid type errors in bbox examples
Data Plane API - Pull Request
NO CHANGES TO ANY API, ONLY THE CODE EXAMPLES.
fixed invalid type errors in bbox examples and removed the suppressions in the readme files.
See PR 27357
API Info: The Basics
Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.
- Link to API Spec engagement record issue:
Is this review for (select one):
- [ ] a private preview
- [ ] a public preview
- [ ] GA release
Change Scope
This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.
- Design Document:
- Previous API Spec Doc:
- Updated paths:
Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.
Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the Swagger-Suppression-Process to get approval.
❔Got questions? Need additional info?? We are here to help!
Contact us!
The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.
- 💬 Teams Channel
Click here for links to tools, specs, guidelines & other good stuff
Tooling
- Open API validation tools were run on this PR. Go here to see how to fix errors
- Spectral Linting
- Open API Hub
Guidelines & Specifications
Helpful Links
Checks stuck in `queued` state?
If the PR CI checks appear to be stuck in `queued` state, please add a comment with contents `/azp run`. This should result in a new comment denoting a `PR validation pipeline` has started and the checks should be updated after few minutes.
Next Steps to Merge
✅ All automated merging requirements have been met! Refer to step 4 in the PR workflow diagram (even if your PR is for data plane, not ARM).
Swagger Validation Report
️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️LintDiff succeeded [Detail] [Expand]
Validation passes for LintDiff.
| compared tags (via openapi-validator v2.1.6) | new version | base version |
|---|---|---|
| default | default(c00b3bc) | default(main) |
| default | default(c00b3bc) | default(main) |
️⚠️Avocado: 1 Warnings warning [Detail]
| Rule | Message |
|---|---|
| :warning: MULTIPLE_API_VERSION | The default tag contains multiple API versions swaggers. readme: specification/maps/data-plane/readme.md tag: specification/maps/data-plane/readme.md#tag-package-stable-2023-06-01 |
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️Automated merging requirements met succeeded [Detail] [Expand]
Swagger Generation Artifacts
️️✔️ApiDocPreview succeeded [Detail] [Expand]
️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]
Breaking Changes Tracking
PR validation pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.
Hey @stevemunk I'll take a look at the new errors. Thank you very much for submitting the PR!
Thankfully no failures on WFS_GetFeatures.
Hey @stevemunk I'll take a look at the new errors. Thank you very much for submitting the PR!
Thankfully no failures on
WFS_GetFeatures.
@scbedd, @eriklindeman: Most of the errors originate in swagger files that are not even used and never will be used (all of them in the microsoft.maps directory). I think we will either have to create a readme.md file for each of these bogus swaggers and add a suppression in each of them, or if possible, convince the owners of these services to remove these files. The remaining two errors are due to the swagger incorrectly defining the bbox parameter as a string, and the example implementing it as an array of doubles.
Oh boy this was a whole barrel of fun.
So it seems this API has some amount of flux in what bbox as a parameter is defined to be. Lets take
specification/maps/data-plane/Creator/preview/2.0/wfs.json which corresponds to WFS_GetFeatures.json example. There, bbox is defined to be:
Which corresponds to the update you made in WFS_GetFeatures.json to make bbox parameter value an array.
However, in the other updated examples:
specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/examples/GetMapImage.jsonspecification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/examples/GetItems.json
Which correspond to specs:
specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/render.jsonspecification/maps/data-plane/Microsoft.Maps/WFS/preview/2.0/wfs.json
bbox is a string
So those bbox parameters should be left alone.
Now, in my local testing, I've also discovered issues with specification/maps/data-plane/Microsoft.Maps/Render/preview/1.0/render.json OTHER THAN what is currently being thrown, so I am checking those out right now.
I'll leave a comment with the full diff of how I updated this to get it green when I have it.
Ok, this gets it green. I feel like these changes make sense, but it's also changing a spec...even if it's very very old and unused.
Arguably the spec changes make sense given that it is supposed to be returning a binary image. I got the idea from specification/maps/data-plane/Microsoft.Maps/Render/preview/2.0/render.json.