Closed oceanlewis closed 1 month ago
Thanks for the PR @oceanlewis. I'm closing this one since OpenAPISpex is designed to have Schema modules resolved to %References{}
immediately after constructing the %OpenApi{}
, as per the example in the README:
@impl OpenApi
def spec do
%OpenApi{
servers: [
# Populate the Server info from a phoenix endpoint
Server.from_endpoint(Endpoint)
],
info: %Info{
title: "My App",
version: "1.0"
},
# Populate the paths from a phoenix router
paths: Paths.from_router(Router)
}
|> OpenApiSpex.resolve_schema_modules() # Discover request/response schemas from path specs
end
Changes the Cast logic to attempt to lookup the schema when given a module as a
:schema
.Addresses these issues: