Closed rochal closed 9 years ago
@z0mt3c please let me know if you have any questions regarding this pull request.
I'm particularly interested if you think models should be created with unique names by default or is my new allowMethodInModelNames
config flag a preferred way.
Thank you!
May we could generate the model names based on it's schema instead of the path. Same schema could/should result in the same model... or at least offer the possibility to specify a name?
Fix issue causing models getting overriden by model definitions from routes with same paths.
Introduced allowMethodInModelNames: true flag to enable this as it might be breaking change in some cases.
Here's the issue:
Create new resource with POST: POST /animals - accepts: { name: "string", age: "integer" }
Update reasource with PUT, but only allow name to be updated: PUT /animals - accepts: { name: "string" }
At the moment, POST Model which should have both name and age props will get overridden by PUT Model because they use same "Animals" model.