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

Fixing support for schema references in parameters. #39

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

vpillinger
Copy link
Contributor

This is a recreation of PR #27 that fixes #26, but with tests and merge-able. I believe it also accomplishes the goal of #35?

An additional point of concern:

I also noticed that the generated snippets with this just say qs: {pet: 'SOME_OBJECT_VALUE'} instead of giving a full example/generation of the object.

Is this an issue/improvement that needs to be made, or is my test case missing something in order to get that to work?

Either way, it seems like an issue for a different PR but I would like some clarification on this.

@ErikWittern
Copy link
Owner

@vpillinger Thank you for that PR!

I agree, this successfully revives #27, and it does address #26.

I also think this fixes #35 (@codyaray)

Giving a better example than 'SOME_OBJECT_VALUE' is not yet supported. I think this may warrant a new, dedicated issue (and eventually PR). However, one concern I have is that there are different encoding styles for query strings, especially when dealing with objects / arrays - so the question becomes which one to use? My personal opinion is that relying on a popular library like https://www.npmjs.com/package/qs to handle the encoding (using default settings) may be a way to go.

For now, thanks for the PR, I will accept and create a new version.

@ErikWittern ErikWittern merged commit 0d313c7 into ErikWittern:master Apr 1, 2020
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

Successfully merging this pull request may close these issues.

Error when schema has a $ref as a direct child
2 participants