You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I could not find a way to do it for a schema created by JsonApi.resource, is it possible ?
PhoenixSwagger.JsonApi.resource do
description("Some JSON API Ressource")
attributes do
attribute1(:number, "An attribute", required: true)
end
additional_properties false
end |> IO.inspect
Returns a schema like this, that accepts additional attributes;
PhoenixSwagger.JsonApi.resource do
description("Some JSON API Ressource")
attributes do
additional_properties false
attribute1(:number, "An attribute", required: true)
end
additional_properties false
end |> IO.inspect
The text was updated successfully, but these errors were encountered:
To make a schema refuse additional properties, it's possible to do this:
This creates a format like:
However, I could not find a way to do it for a schema created by
JsonApi.resource
, is it possible ?Returns a schema like this, that accepts additional attributes;
Whereas this results in a compilation error:
The text was updated successfully, but these errors were encountered: