aqueduct
aqueduct copied to clipboard
[OpenAPI client] Excluding ignored fields in request body
Let's use one of the templates as an example and follow the instructions below:
- Set
@Bind.body(ignore: ['id']) User userin the 11th line - Generate an OpenAPI client web page with command
pub run aqueduct document client - Open generated file in your browser
- Look inside body of Register -> post -> Request body
There is
{
"password": "string",
"id": 0,
"username": "string"
}
But expected schema is
{
"password": "string",
"username": "string"
}
Any of ignored values should be present there.
Also, when we set @Serialize(input: false, output: true) to some model's field (inside that model class), then this field should be excluded as well.
Any news on this?
Nope. I had no time recently. If I find a solution I'll create a PR though.