You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/07/11 16:37:03 UTC

[GitHub] [nifi] tpalfy commented on a diff in pull request #6188: NIFI-10207: ensure allowableValues matches SUPPORTED_STATE in Process…

tpalfy commented on code in PR #6188:
URL: https://github.com/apache/nifi/pull/6188#discussion_r918139488


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ProcessorRunStatusEntity.java:
##########
@@ -26,6 +26,9 @@
 @XmlType(name = "processorRunStatus")
 public class ProcessorRunStatusEntity extends ComponentRunStatusEntity {
 
+    // SUPPORTED_STATE *MUST* match the allowableValues below
+    // if it doesn't, OpenAPI/Swagger generation will generate
+    // correct clients, and they will have errors when deserializing

Review Comment:
   I think a simpler but completely specific reminder comment would be better.
   
   All we really want is to make sure when the constant changes, the annotation is updated as well. The rest is technical detail, one that could be written to almost all similar places.
   
   I'd do something like this:
   
   ```suggestion
       // Must match the @ApiModelProperty.allowableValues above getState()
   ```



-- 
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@nifi.apache.org

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