It would be great to have readOnly: true supported as a model attribute:
type Car struct {
ID string `json:"id" readOnly:"true"` // <----
Name string `json:"name"`
}
Looks like "readOnly" attribute it's OpenAPI 2.0 compliant.
I will like to do PR for it but I'm quite busy in this period .
If you really need this feature and you have some time please contribute to swag by writing a PR.
I would like to have the same feature. I created a pr and added the read only to one of the tests. Let me know if it suffice.
Your PR was approved . Thanks for contributing.
Most helpful comment
I would like to have the same feature. I created a pr and added the read only to one of the tests. Let me know if it suffice.