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

Support for using a JSON string rather than a URL path? #58

Closed
jszwedko opened this issue Sep 19, 2015 · 3 comments
Closed

Support for using a JSON string rather than a URL path? #58

jszwedko opened this issue Sep 19, 2015 · 3 comments

Comments

@jszwedko
Copy link
Contributor

I have a scenario where I need to preprocess the swagger.json before giving it to apivore to validate (translating x-nullable to adding "null" to the type list for a given property). I can take a crack at implementing this, but wanted to see if it the change would be accepted first.

Thank you!

@hornc
Copy link
Contributor

hornc commented Sep 21, 2015

Hi @jszwedko, thanks for getting in touch! I've had a look at your use case from the sfhomeless-api. We have run into problems with types and nulls with other tools also. If I understand you correctly, what you are proposing is a more general feature though, accepting any raw json, rather than getting apivore to recognise x-nullable?

The general feature would be useful, and definitely accepted. The main thing we ask is that there are adequate tests provided for any new feature (see our contributing guidelines )

I might need to look into how others are using x-nullable to get a feel if apivore should know about it or not. It might be a bit fragile? I get the impression the hope is that the other tools will catch up to support multi-types / type + null soon?

I'm happy to discuss further and review code etc -- I'm glad you are finding apivore useful in your project!

Cheers!

@jszwedko
Copy link
Contributor Author

jszwedko commented Oct 2, 2015

Hey! Apologies for the delay. Yeah I was thinking, rather than adding support for x-nullable, just adding support for transforming the JSON before passing to apivore would be more flexible and also allow a workaround for this case..

I'm also mixed about supporting x-nullable directly as this does feel like something that swagger will address soon (hopefully!).

I'll put together a PR for using a string rather than a route. I definitely appreciate the increased confidence apivore gives me that my API is complying with the spec.

@ashoda
Copy link
Collaborator

ashoda commented Jan 3, 2017

Hi @jszwedko, closing this issue in favor of #100

@ashoda ashoda closed this as completed Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants