User Tools

Site Tools


api:swagger

Table of Contents

Swagger

Swagger especially does not yet support HATEOAS: https://github.com/OAI/OpenAPI-Specification/issues/577

Intro

Good resource: https://idratherbewriting.com/learnapidoc/pubapis_openapi_tutorial_overview

Swagger is a set of tools, helping to document on OpenApi 3.0

  • Swagger Editor – browser-based editor where you can write OpenAPI specs.
  • Swagger UI – renders OpenAPI specs as interactive API documentation.
  • Swagger Codegen – generates server stubs and client libraries from an OpenAPI spec.

The ability of APIs to describe their own structure is the root of all awesomeness in OpenAPI. Once written, an OpenAPI specification and Swagger tools can drive your API development further in various ways:

  • Design-first users: use Swagger Codegen to generate a server stub for your API. The only thing left is to implement the server logic – and your API is ready to go live!
  • Use Swagger Codegen to generate client libraries for your API in over 40 languages.
  • Use Swagger UI to generate interactive API documentation that lets your users try out the API calls directly in the browser.
  • Use the spec to connect API-related tools to your API. For example, import the spec to SoapUI to create automated tests for your API.
  • And more! Check out the open-source and commercial tools that integrate with Swagger.

More:https://swagger.io/docs/specification/about/

Example

Here is the pet clinic API example in OpenAPI https://editor.swagger.io/

api/swagger.txt · Last modified: 2023/11/01 07:13 by skipidar