Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties that are marked as readOnly are not read only #78

Open
cebe opened this issue Feb 7, 2025 · 2 comments · May be fixed by #85
Open

Properties that are marked as readOnly are not read only #78

cebe opened this issue Feb 7, 2025 · 2 comments · May be fixed by #85
Assignees
Labels
bug Something isn't working under discussion Still discussing, not ready for implementation.
Milestone

Comments

@cebe
Copy link
Member

cebe commented Feb 7, 2025

moved here from cebe#4

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.

@cebe cebe added the bug Something isn't working label Feb 7, 2025
@cebe cebe added this to the 2.1.0 milestone Feb 7, 2025
@cebe
Copy link
Member Author

cebe commented Feb 7, 2025

could be implemented by removing read-only fields from the default scenario.

@SOHELAHMED7
Copy link
Member

I cannot create a failing test. PR #85 contains a passing test. readOnly properties are already not in model validation rules for any scenario.

Should I remove readOnly properties from faker model?

@SOHELAHMED7 SOHELAHMED7 added the under discussion Still discussing, not ready for implementation. label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working under discussion Still discussing, not ready for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants