Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Add support for x-ms-paths, x-ms-odata, and x-ms-error-response #19

Merged
merged 3 commits into from
Sep 28, 2020

Conversation

rylev
Copy link

@rylev rylev commented Sep 28, 2020

There are two issues with this PR:

  • The tests fail because the newest json we're testing against (apimapis.json) includes empty "definitions" and "parameters" keys while the other json files do not include these when they are empty. In other words, sometimes they are included when empty, and sometimes they are not. We should think about patching assert_json_diff to allow for empty objects to be treated as though the key is not present.
  • The x_ms_odata key is modeled as an Option<String>. The String in this case is always a reference to another file with the object's definition. Unfortunately, normally references are json objects with one key "$ref", but in this case it's just the string value without the key. We should think about how to unify these difference types of references.

This should close #3 though there is still one extension "x-ms-text" which doesn't seem to be in any of the Azure REST spec json files.

@rylev rylev changed the title Add support for x-ms-paths and x-ms-odata Add support for x-ms-paths, x-ms-odata, and x-ms-error-response Sep 28, 2020
src/schema.rs Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support AutoRest Extensions for OpenAPI 2.0
2 participants