Downloading / Publishing YAML removes quotes from strings
See original GitHub issueWhen downloading or publishing an project api specification, we’re seeing previously quoted values being outputted without quotes.
This is in turn leading to a bug with the fields being incorrectly rendered in tooling such as redoc — which typically converts the YAML into a JSON object
A repeatable example can be seen over at https://onlineyamltools.com/convert-yaml-to-json using the following example payloads…
Quoted Date String
Priority Order request:
value:
order:
courier_type: priority
delivery_address: 1 Union Street
delivery_postcode: "2009"
delivery_state: NSW
delivery_suburb: Pyrmont
authority_to_leave: "Yes"
delivery_date: "2016-07-26"
delivery_window: 16:00-19:00
parcel_attributes:
- qty: 1
weight: 2.1
— delivery_date results in displaying as “2016-07-26”
Unquoted Date String
Priority Order request:
value:
order:
courier_type: priority
delivery_address: 1 Union Street
delivery_postcode: "2009"
delivery_state: NSW
delivery_suburb: Pyrmont
authority_to_leave: "Yes"
delivery_date: 2016-07-26
delivery_window: 16:00-19:00
parcel_attributes:
- qty: 1
weight: 2.1
— delivery_date results in displaying as “2016-07-26T00:00:00.000Z”
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
YAML: Do I need quotes for strings in YAML? - Stack Overflow
the YAML cookbook says: Enclosing strings in double quotes allows you to use escaping to represent ASCII and Unicode characters. Does this mean...
Read more >A YAML Primer — OctoPrint master documentation
Never use tabs outside of quoted strings, especially not for indentation. The tab character is illegal within YAML files. Whitespace and indentation matters...
Read more >Strings in YAML - To Quote or not to Quote | tinita [blogs.perl.org]
The good news is, the YAML double quoted string works the same as in JSON, so if you know that already, you will...
Read more >Saving with double quotes in YAML config for \n? - SpigotMC
By manually editing the config, I've tested that \n only works when the loaded string uses double quotes, as shown.
Read more >10 YAML tips for people who hate YAML | Enable Sysadmin
Do you hate YAML? These tips might ease your pain. Posted: June 10, 2019 | 9 min read | by Seth Kenlon (Editorial...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@carlesarnal can you have a look at this?
OK no worries. I’m going to transfer this issue over to the Registry GitHub repository for tracking there.