Skip to content

Numerous fixes to make Swagger parseable and comply with data. #25

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

Closed

Conversation

monty241
Copy link

Numerous fixes to make Swagger parseable and comply with actual data with standard swagger parser of Invantive SQL.

…with standard swagger parser of Invantive SQL.
Copy link
Contributor

@oblakeerickson oblakeerickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for this. My first issue is that we need to edit the yml file like it says in the readme

To edit the api docs, edit the openapi.yml file not the json file.

and then we can convert it to json from there with the node tojson.js script, so that we only have 1 source of truth.

I think this might be where all the extra newline characters are coming from? So there might be a bug or a setting we need to tweak to remove them.

@oblakeerickson
Copy link
Contributor

After diving in a bit, looks like the extra \n's are from the misuse of the | operator in yaml
https://yaml-multiline.info/

Block Style Indicator: The block style indicates how newlines inside the block should behave. If you would like them to be kept as newlines, use the literal style, indicated by a pipe (|).

@oblakeerickson
Copy link
Contributor

oblakeerickson commented Nov 17, 2020

I think we should split this pr into two separate pr's because there are so many \n issues. First make one pr that edits the yaml files and replaces the | character with >- so that when we run tojson.js we not longer have the extra newlines in the json.

Then make another pr with the remaining changes to the yaml files.

I unfortunately cannot accept this pr as is because any future changes we need to make to the yaml files will overwrite the changes you have in the openapi.json file by tojson.js.

@monty241
Copy link
Author

Hi,

OK. It is quite hard for us to work with the yaml files. I will withdraw the pull request. We will be testing and combining the PUT/POST API's into SQL insert/update/delete statements, so more issues may arise.

@monty241 monty241 closed this Nov 18, 2020
oblakeerickson added a commit that referenced this pull request Nov 18, 2020
This change replaces `|`, the literal style, with an `>`, the folded
style, and then we strip the newlines with the `-` chomping indicator.

https://yaml-multiline.info/

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

Successfully merging this pull request may close these issues.

2 participants