open-api-spex / open_api_spex

Open API Specifications for Elixir Plug applications
Mozilla Public License 2.0
706 stars 183 forks source link

spec not implemented for all version example function #623

Closed knorVV closed 2 months ago

knorVV commented 2 months ago

Hi! For you information.

@spec example(schema :: Schema.t() | module, schemas :: OpenApi.t() | map) ::
          map | String.t() | number | boolean

not implement for a function

def example(%Reference{} = reference, schemas) do
    example(Reference.resolve_schema(reference, schemas), schemas)
end

That is why dialyzer make a warnings. UPD: Now we use OpenApiSpex.Reference.resolve_schema/2 before calling OpenApiSpex.Schema.example/2 to exclude errors in dialyzer.

zorbash commented 2 months ago

Thank you @knorVV for reporting this. https://github.com/open-api-spex/open_api_spex/releases/tag/v3.20.1 has been released with a fix.