swagger-api / swagger-api/validator-badge

Editor generated YAML is invalid but JSON is valid

Open
#43 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
227
Forks
81
Avg merge
2h 3m
Merged PRs (30d)
1

Description

From @zenexius on August 6, 2015 10:38

OK so I generated YAML and JSON using the online editor at http://editor.swagger.io/ with no errors.
But when I use these files with swagger-ui deployed on my server , YAML file validation fails while JSON file loads without any problem.
A live example if you would like to check
json that is valid
http://54.169.44.104/swagger-ui/?url=/chirashi/fr-chirashi-api-spec.json
yaml that is invalid
http://54.169.44.104/swagger-ui/?url=/chirashi/fr-chirashi-api-spec.yaml
any hint?

Copied from original issue: swagger-api/swagger-ui#1518

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the difference in swagger-ui using the linked fr-chirashi-api-spec.json and fr-chirashi-api-spec.yaml URLs, then compare the generated YAML and JSON from editor.swagger.io. Trace the validator-badge handling of the YAML input; done means identifying why the YAML fails while the equivalent JSON loads successfully and documenting a reproducible validation result.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.