Closed plunkettscott closed 2 months ago
Thanks for this report!
The first part of this should be fixed, with used_id
showing up as a path parameter.
The second part, with excluding these parameters from the request types will take bit longer. I'll have to change how the response is declared; instead of using a reference I'll probably have to declare it inline, which may be a bit messy because path parameters can be nested deep inside of protobuf messages, so resolving to a filtered type will be a bit... fun.
Thanks! I've verified the first part in the other issue, but let me know if/when you need me to test on this second part. Truthfully, I don't have any schemas where the path parameter is nested deeply, it's always a top-level field of the message, so a solution for nested messages is not super important to me if you need more time to evaluate that one.
@plunkettscott Hey, this should be resolved by v0.10.0. As discussed, this only deals with the top-level fields for a message. If it is requested that we filter out attributes from nested messages I'd welcome that issue. I'm just not sure it's really desired/needed.
According to
google.api.http
documentation, specifying thebody
of*
means any fields that are not matched in the path template, however, the following schema is incorrectly generated in the OpenAPI definition according to that specification:This results in this OpenAPI path definition:
And the following is the SuspendUserRequest from the schema:
The expected behavior here would be for the path to contain a
parameters
definition withuser_id
mapping to the path variable in the URL and it should be excluded from theSuspendUserRequest
payload.