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

Store examples as strings only for types not representable in JSON/YAML #671

Closed
null-dev opened this issue Mar 1, 2019 · 7 comments
Closed
Assignees
Labels

Comments

@null-dev
Copy link

null-dev commented Mar 1, 2019

A regression was introduced while fixing this issue: #399 causing examples to always be stored as strings.

Instead, examples should only be stored as strings when they cannot be represented in JSON/YAML.

Relevant OpenAPI specification: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#exampleObject

@EricWittmann EricWittmann self-assigned this Mar 1, 2019
@Nicnl
Copy link

Nicnl commented Mar 11, 2019

I'm encountering this issue too

I'm trying to create a json example

image

But it's getting stored as a string

image

And the finished result is quoted without syntax highlighting

image

If I manually edit the json and paste my object in it

image

The end result is as expected

image

Sorry to be a bother, but is there any news concerning this issue?
Right now it's the only one that makes it difficult to use

@EricWittmann
Copy link
Member

No bother at all - the more noise that an issue receives in the community, the more likely it is to be prioritized. :) I was out on vacation last week, but am back now and ready to squash some bugs. I'll see if I can carve out some time today for this.

@EricWittmann
Copy link
Member

This will be fixed in the next release of Apicurio (which should be done today or tomorrow). I'm very interested to see if the changes work well for you, so if it's possible to provide some feedback here once you've had a chance to try it that'd be awesome!

@Nicnl
Copy link

Nicnl commented Mar 13, 2019

With pleasure

@null-dev
Copy link
Author

Seems to work perfectly for me, thanks @EricWittmann for creating the best free OpenAPI editor out there!

@EricWittmann
Copy link
Member

Great thanks for the feedback. FYI, watch out for this bug (a use-case I missed when addressing #671):

#693

@Nicnl
Copy link

Nicnl commented Mar 18, 2019

Sorry for the delay

It's working great on my end too

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants