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

Add OpenApi v3 components/requestBodies ref support #320

Merged
merged 3 commits into from Jun 13, 2019

Conversation

Projects
None yet
2 participants
@kelnos
Copy link
Member

commented Jun 6, 2019

The resolve option to the parser (which we use) appears to auto-resolve references to parameters, headers, and responses (at least), but for some reason doesn't do the same for requestBodies.

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

@kelnos kelnos requested a review from blast-hardcheese Jun 6, 2019

@kelnos kelnos force-pushed the kelnos:requestbodies-ref-support branch from c9e20fc to f9abaa3 Jun 7, 2019

@blast-hardcheese
Copy link
Collaborator

left a comment

lgtm

@@ -430,6 +431,30 @@ object SwaggerUtil {
.map(_.toMap)
}

def copyOperation(operation: Operation): Operation =
new Operation()

This comment has been minimized.

Copy link
@blast-hardcheese

blast-hardcheese Jun 13, 2019

Collaborator

No concerns that this is shallow?

This comment has been minimized.

Copy link
@blast-hardcheese

blast-hardcheese Jun 13, 2019

Collaborator

Ah, I see that it's currently only used for one thing. Hopefully this doesn't bite us.

This comment has been minimized.

Copy link
@kelnos

kelnos Jun 13, 2019

Author Member

We generally treat openapi model objects as immutable (with this new exception), so it's probably not an issue. I added the copying bit out of an overabundance of caution that probably isn't even needed, but I feel safer that way.

@kelnos kelnos merged commit 9685794 into twilio:master Jun 13, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@kelnos kelnos deleted the kelnos:requestbodies-ref-support branch Jun 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.