openapi-generator/samples/server/petstore/finch
Jim Schubert 52322c47c9 [finch] Allow finch server to compile for CI checks (#7)
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.
2018-05-13 11:07:14 +08:00
..
.openapi-generator Rename "swagger" to "openapi" (#191) 2018-04-22 21:28:17 +02:00
project [Scala][Finch] Adding security definitions to Finch (#6891) 2017-11-27 16:38:12 +08:00
src/main/scala [finch] Allow finch server to compile for CI checks (#7) 2018-05-13 11:07:14 +08:00
.openapi-generator-ignore Regenerate samples (#367) 2018-05-08 16:44:51 +08:00
build.sbt [finch] Allow finch server to compile for CI checks (#7) 2018-05-13 11:07:14 +08:00
README.md Regenerate samples (#367) 2018-05-08 16:44:51 +08:00
sbt [WIP][Scala] Finch generator (#3905) 2017-01-29 12:15:39 +08:00

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:

README

After generation

Run scalafix RemoveUnusedImports to cleanup unused imports.