Closed raphaeloliveira closed 5 years ago
Hey @yonaskolb, I added an entry on changelog, updated the spec with a new scheme that contains nullable properties and regenerated the fixtures. Let me know if something is missing.
One thing which is not clear for me yet is how to run the tests per see, and what is being verified against what.
Thanks!
As a side note, I pasted https://github.com/yonaskolb/SwagGen/blob/master/Specs/TestSpec/spec.yml on Swagger Editor and the following errors were raised:
Semantic error at paths./multiple-path-params{petID}
Declared path parameter "petID" needs to be defined as a path parameter at either the path or operation level
Jump to line 55
Structural error at components.schemas.Zoo.properties.schemaAnimals.items
should be object
Jump to line 301
Semantic error at components.schemas.Zoo.properties.schemaAnimals.items
`items` must be an object
Jump to line 301
Not sure how relevant they are.
Thanks! I meant to say run swift test
above which generates all the fixtures. It fails if something has changed and will tell you so, but if you rerun it it will pass. The generated files are used on CI to see if after generation there is a diff. You can see that in https://github.com/yonaskolb/SwagGen/blob/master/.circleci/config.yml and the actual build itself on CircleCI https://circleci.com/gh/yonaskolb/SwagGen/351?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
Ah cool, would be probably nice to add some documentation about the tests, unless there is some and I missed it.
Thanks for the help!
Great, thanks @raphaeloliveira! Could you:
swift test
and check in the results. (Checking in the generated fixtures is required for tests to pass on CI)