esecules commented on code in PR #9577:
URL: https://github.com/apache/nifi/pull/9577#discussion_r1931155651
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java:
##########
@@ -555,11 +555,15 @@ public Response getBreadcrumbs(
public Response getFlowMetrics(
@Parameter(
description = "The producer for flow file metrics. Each
producer may have its own output format.",
- required = true
+ required = true,
+ schema = @Schema(allowableValues = {"prometheus", "json"})
)
@PathParam("producer") final String producer,
@Parameter(
- description = "Set of included metrics registries"
+ description = "Set of included metrics registries.
Duplicate the parameter to include multiple registries. " +
+ "All registries are included by default.",
+
+ schema = @Schema(allowableValues = {"NIFI", "JVM",
"BULLETIN", "CONNECTION", "CLUSTER"})
Review Comment:
Without the schema / allowableValues, the generated swagger.yaml has all
these values already, but either way doesnt make a difference to the final API
in my browser. It seems to get them from inspecting the type of this parameter.
The same can't be said for the `producer` above since its just a string.
However, I am not seeing any of these parameters in the
`/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/nifi-web-api-2.2.0-SNAPSHOT/docs/rest-api/index.html`
file when i load it in my browser. Maybe whatever generates that from the
swagger spec is missing something?
There's also an existing API in the same scenario, it's swagger has the
allowed enum values listed, but they do not show up in the docs:


--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]