Skip to content

Use Semi-Automatic OpenAPI Specs of the Backend API #3204

@vbaranov

Description

@vbaranov

Starting with the v9 backend release, semi-automatic OpenAPI
specification files are generated for each release and stored in:

https://github.com/blockscout/swaggers/tree/master/blockscout

Update the frontend application to use these specification files.

Swagger File Structure

A separate Swagger file is generated per release and per chain type.
The file path format is:

https://github.com/blockscout/swaggers/tree/master/blockscout/[release_number]/[chain_type_name]/swagger.yaml

Where:

  • release_number is backend release version, e.g. 9.3.2
    (without the leading v)
  • chain_type_name is chain type name, e.g. ethereum, gnosis

Retrieving the Release Version

The release version can be obtained from:

api/v2/config/backend-version

Notes

  • In many environments we run non-released backend versions.
  • These still include the release number and follow the format:
    v[release_number]+commit.[commit_hash]

Example:

    v9.3.2+commit.a7ab3460

Metadata

Metadata

Assignees

Labels

v2.7.0Release v2.7.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions