yii2-openapi icon indicating copy to clipboard operation
yii2-openapi copied to clipboard

Properties that are marked as readOnly are not read only

Open ItsReddi opened this issue 6 years ago • 1 comments

The generated code does not respect the "readOnly" property. This is because of the generated model rules. and the requestbody is loaded against the DatabaseModel.

It could be a good idea to create a validator for each endpoint to be able to mix the same property on different endpoints.

ItsReddi avatar Oct 23 '19 11:10 ItsReddi

yeah, validation should use the schema definition instead of yii model rules, this is currently not implemented.

cebe avatar Oct 23 '19 13:10 cebe