Closed krainboltgreene closed 2 days ago
Here you can see the type annotation: https://github.com/open-api-spex/open_api_spex/blob/master/lib/open_api_spex/response.ex#L25
But the real type spec seems to be:
@type t :: %__MODULE__{ description: String.t(), headers: %{String.t() => Header.t() | Reference.t()} | nil, content: %{MediaType.t() => String.t()} | nil, links: %{String.t() => Link.t() | Reference.t()} | nil, extensions: %{String.t() => any()} | nil }
Based on https://swagger.io/specification/#responseObject:~:text=Response%20Object%20Examples
In fact all of the pairs seem inverted? Do yall want me to make a PR?
The type spec is correct. MediaType.t() is what the swagger spec refers to as Media Type Object and the String.t() map key is the media type, eg "text/plain".
MediaType.t()
String.t()
Here you can see the type annotation: https://github.com/open-api-spex/open_api_spex/blob/master/lib/open_api_spex/response.ex#L25
But the real type spec seems to be:
Based on https://swagger.io/specification/#responseObject:~:text=Response%20Object%20Examples
In fact all of the pairs seem inverted? Do yall want me to make a PR?