mrin9 / RapiPdf

PDF generation from OpenAPI / Swagger Spec
https://mrin9.github.io/RapiPdf
MIT License
283 stars 103 forks source link

readOnly parameters are included in requests #28

Closed StephenNay closed 4 years ago

StephenNay commented 5 years ago

I mark any service-generated parameters as readOnly, such as UUIDs and timestamps for when resources are created and updated. The parameters should only be shown in responses, never in requests. RapiPdf includes those parameters in requests, which is confusing. It does show "read-only" in the type column, but that's not as clear as not showing those parameters at all for requests. That is, it's better to say that a request body includes A, B, and C instead of A, B, C, and D, but D is read-only.

mrin9 commented 5 years ago

In our roadmap we have plans to print the examples for request and responses, when we do that we will be omitting the readonly params in generated examples, but we do have an opinion to display all fields and their constraints when it comes to printing the schema. something we did it in our online renderer RapiDoc this is also the case with SwaggerUI