Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rafalsumislawski/swaggerify
Deriving swagger files from Scala code
https://github.com/rafalsumislawski/swaggerify
rho scala swagger type-classes
Last synced: about 1 month ago
JSON representation
Deriving swagger files from Scala code
- Host: GitHub
- URL: https://github.com/rafalsumislawski/swaggerify
- Owner: RafalSumislawski
- License: apache-2.0
- Created: 2019-01-13T20:13:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-02T20:44:28.000Z (about 3 years ago)
- Last Synced: 2023-07-04T21:12:27.615Z (over 1 year ago)
- Topics: rho, scala, swagger, type-classes
- Language: Scala
- Size: 76.2 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/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](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) and [client generators](https://github.com/OpenAPITools/openapi-generator).
## 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](https://github.com/propensive/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](https://github.com/swagger-api/validator-badge) 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](LICENSE)).
Swaggerify contains parts of code from [http4s/rho](https://github.com/http4s/rho) licensed under Apache License, Version 2.0 (see the license of rho: [LICENSE.rho](LICENSE.rho))