Open StephenNay opened 4 years ago
@StephenNay parsing dates is a known problem of YAML, take a look at this https://github.com/nodeca/js-yaml/issues/161
to prevent this, my best choice is quoting as a string the date, but if you will work with the custom schema you can do using --schema
argument https://github.com/javanile/yamlinc#use-an-external-schema
See more:
I'm also experiencing this issue but with strings that are not in a specific format: In my base file:
phone:
type: string
example: 0102030405
The swagger.inc.yml:
phone:
type: string
example: 17314053
What's weird is that I have a postal_code declared the same way:
postal_code:
type: string
example: 33130
And in the swagger.inc.yml file the postal_code has the correct value
Here's a piece of a request definition in one of my source files:
And here's the same section after merging with yamlinc:
Note how the example date in the last line has been changed from just the date to a full date and time format, which is not what I want in this case. Is there a way to prevent this from happening?