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

ruleset: Microsoft Azure #476

Closed
10 tasks
philsturgeon opened this issue Aug 22, 2019 · 0 comments
Closed
10 tasks

ruleset: Microsoft Azure #476

philsturgeon opened this issue Aug 22, 2019 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@philsturgeon
Copy link
Contributor

philsturgeon commented Aug 22, 2019

Similar to #475, the folks over at Microsoft Azure have implemented a subset of OpenAPI for their API Import functionality.

https://docs.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions

We should guide folks through that with a new ruleset.

Create a new ruleset ms-azure-openapi which extends the spectral:oas ruleset.

  • Required parameters across both path and query must have unique names. (In OpenAPI a parameter name only needs to be unique within a location, for example path, query, header. However, in API Management we allow operations to be discriminated by both path and query parameters (which OpenAPI doesn't support). That's why we require parameter names to be unique within the entire URL template.)

  • $ref pointers can't reference external files.

  • x-ms-paths and x-servers are the only supported extensions.

  • Custom extensions are ignored on import and aren't saved or preserved for export.

  • Recursion - API Management doesn't support definitions defined recursively (for example, schemas referring to themselves).

  • Source file URL (if available) is applied to relative server URLs.

OpenAPI version 2

  • Only JSON format is supported.

OpenAPI version 3

  • If many servers are specified, API Management will try to select the first HTTPs URL. If there aren't any HTTPs URLs - the first HTTP URL. If there aren't any HTTP URLs - the server URL will be empty.

  • Examples isn't supported, but example is. (seek clarification on where but I am going to guess they mean response examples/example, not property example/examples)

  • Multipart/form-data isn't supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant