Open akuchcik opened 1 week ago
When using env variable URL instead of URLS in docker image swaggerapi/swagger-ui I get the same error, but when using springdoc that problem persists in both cases (setting url or urls in custom swagger controller).
Looks similar to https://github.com/swagger-api/swagger-ui/issues/9979 It looks like a regression introduced in 5.17.8 and later
I'm resending conversation and issue report from https://github.com/springdoc/springdoc-openapi :
Any value provided inside the parameter input field is ignored and the resulted url only has {parameter} inside it instead of the actual value.
Issue occurs when using springdoc-openapi-starter-webmvc-ui with custom yaml file Using the same file with docker image swaggerapi/swagger-ui doesn't result with this issue and works as expected
I found out that the reason for this is the "=" (equals sign) in the path. This path works: /data/logging-status/broker/{broker-identifier} but this path doesn't work: /data/logging-status/broker={broker-identifier}
I created a new spring boot application with minimal requirements https://github.com/akuchcik/springdoc-url-parameter-bug :
Custom yaml file (same problem on 3.1.0 version):
Reply from @bnasslahsen : Your expected behavior is invalid. You are declaring broker-identifier as path variable, whereas it should be declared as query parameter.
NOTE: OpenAPI defines a unique operation as a combination of a path and an HTTP method:
Answer: if I define it as query the resulted url looks like this: "http://localhost:8080/data/logging-status/broker={broker-identifier}?broker-identifier=test"
It just adds a query at the end of the url. I am not using a query as I'm not using "?" after the path. I am specifying an entry in a list. This describing of entries/keys in a list of elements is defined in RESTCONF Protocol - RFC 8040. When using docker image swaggerapi/swagger-ui it is working as expected.
REPLY: @akuchcikm,
Is the OpenAPI spec correct ? If it's the case, then it's not a sprindoc issue. You should reach the https://github.com/swagger-api/swagger-ui/issues instead.
LINK TO THE ORIGINAL REPORTED ISSUE: https://github.com/springdoc/springdoc-openapi/issues/2764