-
Notifications
You must be signed in to change notification settings - Fork 956
Visit post #234
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
base: master
Are you sure you want to change the base?
Visit post #234
Conversation
@peterfk Not sure I got it - as I see you made changes for PUT endpoint, it's not a POST |
@@ -2086,9 +2086,9 @@ components: | |||
format: int32 | |||
minimum: 0 | |||
example: 1 | |||
readOnly: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: could you explain why you changed the readonly
flag of the petId
property belonging to the Visit
type that you didn't use again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the read only flag was the root issue. It means the the field is only displayed in the response not the request object. But it is needed for the request object on the post (insert) operation. Does that answer it for you?
I then changed the put op because petId as a required field would have showed up in that one too but we don't want it there since petId is not editable |
Interestingly this whole thing is really a documentation error. Even without these changes you can manually add petId to the post and it will work but no one will know that unless you really look at the code. |
I should clarify that I'm talking about the swagger documentation Swagger UI is available at: http://localhost:9966/petclinic/swagger-ui.html. just in case that wasn't clear |
This pr is for issue #231. It includes petId for the post payload and makes it required since it's a required field in the table. It also changes the put method to preserve the existing interface since petId is not editable. Let me know if any changes are required.