atc-net / atc-rest-api-generator

A REST API code generator from OpenAPI Specification in YAML or Json file format
https://atc-net.github.io/repository/atc-rest-api-generator
MIT License
19 stars 4 forks source link

Swagger UI: RoutePatternException #90

Closed kimlundjohansen closed 3 years ago

kimlundjohansen commented 3 years ago

Describe the bug Swagger UI cannot start up and a RoutePatternException is thrown: The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value.

Expected behavior Swagger UI should load.

Scenario Happens if the spec file differs from:

servers:

Suggestion Make spec validation of that part.

davidkallesen commented 3 years ago

The 'bug' is just a missing validation for server/url start path.

Implement validation to follow the rules from the OpenApi spec: https://swagger.io/docs/specification/api-host-and-base-path/