hamnis / sttp-apispec

OpenAPI, AsyncAPI and JSON Schema Scala models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sttp-apispec

Join the chat at https://gitter.im/softwaremill/tapir CI Maven Central

sttp is a family of Scala HTTP-related projects, and currently includes:

  • sttp client: The Scala HTTP client you always wanted!
  • sttp tapir: Typed API descRiptions.
  • sttp model: Simple Scala HTTP model.
  • sttp apispec: this project. OpenAPI, AsyncAPI and JSON Schema models.

Quickstart with sbt

Add one of the following dependencies:

// common model classes, including Schema
"com.softwaremill.sttp.apispec" %% "apispec-model" % "0.2.1"

// only model classes, root: OpenAPI
"com.softwaremill.sttp.apispec" %% "openapi-model" % "0.2.1"
// circe encoders for the model classes
"com.softwaremill.sttp.apispec" %% "openapi-circe" % "0.2.1"
// extension method for OpenAPI to convert to yaml
"com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % "0.2.1"

// only model classes, root: AsyncAPI
"com.softwaremill.sttp.apispec" %% "asyncapi-model" % "0.2.1"
// circe encoders for the model classes
"com.softwaremill.sttp.apispec" %% "asyncapi-circe" % "0.2.1"
// extension method for AsyncAPI to convert to yaml
"com.softwaremill.sttp.apispec" %% "asyncapi-circe-yaml" % "0.2.1"

sttp apispec is available for Scala 2.12, 2.13, 3, Scala.JS and Scala Native.

Documentation

Javadocs

Contributing

If you have a question, or hit a problem, feel free to ask on our gitter channel!

Or, if you encounter a bug, something is unclear in the code or documentation, don’t hesitate and open an issue on GitHub.

Building & testing the scala-native version

By default, native projects will not be included in the aggregate build of the root project. To include it, define the STTP_NATIVE environmental variable before running sbt, e.g.:

STTP_NATIVE=1 sbt

You might need to install some additional libraries, see the scala native documentation site.

Commercial Support

We offer commercial support for sttp and related technologies, as well as development services. Contact us to learn more about our offer!

Copyright

Copyright (C) 2022 SoftwareMill https://softwaremill.com.

About

OpenAPI, AsyncAPI and JSON Schema Scala models.

License:Apache License 2.0


Languages

Language:Scala 100.0%