Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JSON is also valid YAML #267

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

Open
Hypfer wants to merge 1 commit into Surnet:v7
base: v7
Choose a base branch
Loading
from Hypfer:patch-1
Open

JSON is also valid YAML #267

Hypfer wants to merge 1 commit into Surnet:v7 from Hypfer:patch-1

Conversation

@Hypfer
Copy link

@Hypfer Hypfer commented May 5, 2021

Since YAML is a superset of JSON, we can also accept json files here.

Since YAML is a superset of JSON, we can also accept json files here
Copy link
Collaborator

can you add tests to your pr?

Copy link
Author

Hypfer commented Jun 1, 2021

Well that would essentially mean testing the YAML parser itself since that's just the spec.

See https://yaml.org/spec/1.2/spec.html#id2759572

YAML can therefore be viewed as a natural superset of JSON, offering improved human readability and a more complete information model. This is also the case in practice; every JSON file is also a valid YAML file. This makes it easy to migrate from JSON to YAML if/when the additional features are required.

SimonKocurek reacted with thumbs up emoji

Copy link

stale bot commented Jul 31, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 31, 2021
Copy link
Author

Hypfer commented Jul 31, 2021

ping

RafaelRamosR reacted with heart emoji

@stale stale bot removed the wontfix label Jul 31, 2021
Copy link

SimonKocurek commented Aug 5, 2021
edited
Loading

@daniloab but tests are already loading files in JSON format: https://github.com/Surnet/swagger-jsdoc/blob/master/test/lib.spec.js#L208

EDIT: You could add test for .json format here to test your functionality: https://github.com/Surnet/swagger-jsdoc/blob/master/test/specification.spec.js#L106

Hypfer and daniloab reacted with thumbs up emoji

@daniloab daniloab added the pinned Issues that will not be automatically closed label Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

pinned Issues that will not be automatically closed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /