Closed DDDHuang closed 3 years ago
Use GlobalSpec like
GlobalSpec = #{ swagger => "2.0", info => #{title => "EMQ X API", version => "5.0.0"}, basePath => "/v5/api" }
or
GlobalSpec = #{ openapi => "3.0.0", info => #{title => "EMQ X API", version => "5.0.0"}, servers => [#{url => "http://localhost:8081/v5/api"}] }
and trails as
trails() -> Metadata = #{get => #{any => any}}, [{"/v5/api/my_api", Metadata}].
In swagger, execute will like
curl -X GET "http://localhost:8081/api/v5/api/v5/my_api"
The "/api/v5/api/v5" is double. Path should trans to without basePath or url def in GlobalSpec.
PR is in coming.
Use GlobalSpec like
or
and trails as
In swagger, execute will like
The "/api/v5/api/v5" is double. Path should trans to without basePath or url def in GlobalSpec.
PR is in coming.