rafalsumislawski / swaggerify   0.3.2

Apache License 2.0 GitHub

Deriving swagger files from Scala code

Scala versions: 2.13 2.12

Swaggerify

Swaggerify is a library implementing type-class approach to generating swagger files from Scala code.

Swaggerify is heavily inspired by, and based on http4s/rho. Swaggerify is a research towards providing similar features with more compile-time assertions, as well as improving compatibility with the Swagger 2.0/OpenAPI 2.0 specification and client generators.

Design

Swaggerify is designed aroud Swaggerify[T] type-class which provies facilities to generate Swagger model/property/parameter from type T. Swaggerify instances for Algebraic Data Types (ADTs) are derived with magnolia.

Development Status

Building models, properties and parameters from Scala (and Java) types is mostly ready with few minor exceptions. A minimalistic builder for describing routes/paths is under development, although the plan is to eventually replace it with a modified version of rho's DSL. Setup for testing compatibility with specification using swagger-validator is in place. I've done some test with a real-life API model, which I couldn't share here.

License

Swaggerify is licensed under Apache License, Version 2.0 (see LICENSE). Swaggerify contains parts of code from http4s/rho licensed under Apache License, Version 2.0 (see the license of rho: LICENSE.rho)