mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
52322c47c9
Previous error handling implementation had types returning Either[CommonError, UserType], but implemented with the scala shortcut ??? which throws an exception instead. This causes compilation to fail with a message that the expected CommonError is of type Any. This is often fixable with generic upper bounds constraints, but this is overkill for a placeholder implementation. Returning a temporary 'TODO' type solves the compile error, and should allow CI to check for valid compilation on changes. Included in this is also a fix to support optional query parameter types. The spec used to generate the finch server has optional query parameters, but the version of finch in the template doesn't support options on query parameters. Finch does, however, aggregate everything (headers, query string, path parameters, etc) under "param" with "paramOption" for those which are optional types. |
||
---|---|---|
.. | ||
.openapi-generator | ||
project | ||
src/main/scala | ||
.openapi-generator-ignore | ||
build.sbt | ||
README.md | ||
sbt |
OpenAPI generated server
Overview
This server was generated by the OpenAPI Generator project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub. This is an example of building a OpenAPI-enabled scalatra server.
This example uses the finch framework. To see how to make this your own, look here:
After generation
Run scalafix RemoveUnusedImports
to cleanup unused imports.