Crates.io | openapi-gateway |
lib.rs | openapi-gateway |
version | 0.1.4 |
source | src |
created_at | 2022-02-13 21:11:09.873546 |
updated_at | 2022-02-18 19:53:54.720286 |
description | API Gateway based on OpenAPI routes |
homepage | https://github.com/adhesivee/openapi-gateway |
repository | https://github.com/adhesivee/openapi-gateway |
max_upload_size | |
id | 531902 |
size | 18,031,609 |
API Gateway that build its routes via OpenAPI specification.
Hot reloading of OpenAPI files is supported with reload_cron
(see Config).
This project simplifies orchestration of services that work with OpenAPI.
# openapi-gateway-config.toml
# Refresh every minute
reload_cron = "* * * * *"
[[openapi_urls]]
name = "Swagger petstore example V2#JSON"
url = "https://petstore.swagger.io/v2/swagger.json"
[[openapi_urls]]
name = "Swagger petstore example V2#YAML"
url = "https://petstore.swagger.io/v2/swagger.yaml"
[[openapi_urls]]
name = "Swagger petstore example V3#JSON"
url = "https://petstore3.swagger.io/api/v3/openapi.json"
[[openapi_urls]]
name = "Swagger petstore example V3#YAML"
url = "https://petstore3.swagger.io/api/v3/openapi.yaml"
cargo run
cargo install openapi-gateway
openapi-gateway
Open http://127.0.0.1:8080/docs/
to find the configured routes.