You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/13 12:58:50 UTC

[GitHub] [flink] zentol commented on pull request #19836: [FLINK-27819][rest][docs] Use proper operationIds

zentol commented on PR #19836:
URL: https://github.com/apache/flink/pull/19836#issuecomment-1153882942

   > Do these IDs need to be unique
   yes
   
   > does something guarantee they are
   
   Currently no, but it would be easy to verify this on our side during the generation process. We need this anyway independent of whether we generate the names or not.
   Long-term we need to look into validating the spec as a whole via some external tool (which would likely catch this).
   
   I added a commit that adds a check for this.
   
   > Overall I'm just wondering if this is being a bit too clever in a way that could cause problems later on.
   
   I agree that in some cases I tried to be too clever.
   I made some changes to reduce the amount of assumption we make, and introduce proper checks to make sure the remaining ones are valid.
   
   The regex logic was removed from the generator; the default `operationId()` implementation now takes care of stripping the 'Headers' suffix, so that the generator no longer makes assumptions about the default `operationId()` implementation.
   The default implementation is now only used for GET endpoints; those are the most common and all have regular names.
   For other verbs the default implementation throws an exception; it must be overridden as there isn't a good way to generate those.
   
   Maybe we should bite the bullet and just set them manually everywhere. I'm personally fine with the _current_ state because it works properly for _all_ GET endpoints.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org