Swagger is broken.
See original GitHub issueAll of the swagger files downloadable from the site and found at https://github.com/apache/pulsar/tree/master/site2/website/static/swagger/2.7.0 are invalid according to several of the tools I’ve attempted to use. The following outputs are from interaction with the validatation API at swagger.io like so:
swagger.json
curl -X GET "https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fraw.githubusercontent.com%2Fapache%2Fpulsar%2Fmaster%2Fsite2%2Fwebsite%2Fstatic%2Fswagger%2F2.7.0%2Fswagger.json" -H "accept: application/yaml"
---
messages:
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/backlogQuota'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/backlogQuota'(delete).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/backlogQuotaMap'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/compactionThreshold'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/compactionThreshold'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/deduplicationSnapshotInterval'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/deduplicationSnapshotInterval'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/delayedDelivery'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/delayedDelivery'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/dispatchRate'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/dispatchRate'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/inactiveTopicPolicies'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/inactiveTopicPolicies'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/maxConsumersPerSubscription'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/maxConsumersPerSubscription'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/offloadPolicies'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/offloadPolicies'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/offloadPolicies'(delete).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/persistence'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/persistence'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/retention'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/retention'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/subscribeRate'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/subscribeRate'(post).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/subscriptionDispatchRate'(get).operationId\
\ is repeated"
- "attribute paths.'/non-persistent/{tenant}/{namespace}/{topic}/subscriptionDispatchRate'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}'(get).operationId is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/partitioned'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}'(put).operationId is\
\ repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/all_subscription/expireMessages/{expireTimeInSeconds}'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/backlog'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/backlogQuota'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/backlogQuota'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/backlogQuotaMap'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/compaction'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/compaction'(put).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/compactionThreshold'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/compactionThreshold'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/compactionThreshold'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/createMissedPartitions'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/deduplicationEnabled'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/deduplicationEnabled'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/deduplicationEnabled'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/deduplicationSnapshotInterval'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/deduplicationSnapshotInterval'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/deduplicationSnapshotInterval'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/delayedDelivery'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/delayedDelivery'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/delayedDelivery'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/dispatchRate'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/dispatchRate'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/dispatchRate'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/examinemessage'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/inactiveTopicPolicies'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/inactiveTopicPolicies'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/inactiveTopicPolicies'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/internal-info'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/internalStats'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/lastMessageId'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/ledger/{ledgerId}/entry/{entryId}'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxConsumers'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxConsumers'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxConsumers'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxConsumersPerSubscription'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxConsumersPerSubscription'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxConsumersPerSubscription'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxProducers'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxProducers'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxProducers'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxUnackedMessagesOnConsumer'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxUnackedMessagesOnConsumer'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxUnackedMessagesOnConsumer'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxUnackedMessagesOnSubscription'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxUnackedMessagesOnSubscription'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/maxUnackedMessagesOnSubscription'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/messageTTL'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/messageTTL'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/messageTTL'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/offload'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/offload'(put).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/offloadPolicies'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/offloadPolicies'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/offloadPolicies'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/partitioned-stats'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/partitions'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/partitions'(put).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/partitions'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/partitions'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/permissions'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/permissions/{role}'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/permissions/{role}'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/persistence'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/persistence'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/persistence'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/publishRate'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/publishRate'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/publishRate'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/retention'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/retention'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/retention'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/stats'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscribeRate'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscribeRate'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscribeRate'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/expireMessages/{expireTimeInSeconds}'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/position/{messagePosition}'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor/{timestamp}'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/skip/{numMessages}'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/skip_all'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscription/{subscriptionName}'(put).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscriptionDispatchRate'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscriptionDispatchRate'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscriptionDispatchRate'(delete).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/subscriptions'(get).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/terminate'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/terminate/partitions'(post).operationId\
\ is repeated"
- "attribute paths.'/persistent/{tenant}/{namespace}/{topic}/unload'(put).operationId\
\ is repeated"
- "attribute paths.'/schemas/{tenant}/{namespace}/{topic}/schema/{version}'(get).operationId\
\ is repeated"
schemaValidationMessages: null
swaggerfunctions.json
curl -X GET "https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fraw.githubusercontent.com%2Fapache%2Fpulsar%2Fmaster%2Fsite2%2Fwebsite%2Fstatic%2Fswagger%2F2.7.0%2Fswaggerfunctions.json" -H "accept: application/yaml"
---
messages:
- "attribute paths.'/functions/{tenant}/{namespace}/{functionName}/{instanceId}/restart'(post).operationId\
\ is repeated"
- "attribute paths.'/functions/{tenant}/{namespace}/{functionName}/{instanceId}/start'(post).operationId\
\ is repeated"
- "attribute paths.'/functions/{tenant}/{namespace}/{functionName}/{instanceId}/stop'(post).operationId\
\ is repeated"
schemaValidationMessages: null
swaggersink.json
curl -X GET "https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fraw.githubusercontent.com%2Fapache%2Fpulsar%2Fmaster%2Fsite2%2Fwebsite%2Fstatic%2Fswagger%2F2.7.0%2Fswaggersink.json" -H "accept: application/yaml"
---
messages:
- "attribute paths.'/sinks/{tenant}/{namespace}/{sinkName}/{instanceId}/restart'(post).operationId\
\ is repeated"
- "attribute paths.'/sinks/{tenant}/{namespace}/{sinkName}/{instanceId}/start'(post).operationId\
\ is repeated"
- "attribute paths.'/sinks/{tenant}/{namespace}/{sinkName}/{instanceId}/stop'(post).operationId\
\ is repeated"
schemaValidationMessages: null
swaggersource.json
curl -X GET "https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fraw.githubusercontent.com%2Fapache%2Fpulsar%2Fmaster%2Fsite2%2Fwebsite%2Fstatic%2Fswagger%2F2.7.0%2Fswaggersource.json" -H "accept: application/yaml"
---
messages:
- "attribute paths.'/sources/{tenant}/{namespace}/{sourceName}/{instanceId}/restart'(post).operationId\
\ is repeated"
- "attribute paths.'/sources/{tenant}/{namespace}/{sourceName}/{instanceId}/start'(post).operationId\
\ is repeated"
- "attribute paths.'/sources/{tenant}/{namespace}/{sourceName}/{instanceId}/stop'(post).operationId\
\ is repeated"
schemaValidationMessages: null
In addition, when these duplicate opreationId errors are resolved through heuristics, several routes from the combined swagger violate the spec by including two or more body parameters, which is not allowed:
The swagger spec at "/Users/awalker/devel/pulsaradmin/clienttest/combined.json" is invalid against swagger specification 2.0. see errors :
- duplicate parameter name "body" for "body" in operation "triggerFunction"
- duplicate parameter name "body" for "body" in operation "updateFunction"
- duplicate parameter name "body" for "body" in operation "updateSink"
- duplicate parameter name "body" for "body" in operation "updateSource"
As it stands, it is not possible to build administrative clients for pulsar from the swagger using any tool that respects the spec.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (8 by maintainers)
Top Results From Across the Web
[BUG] Swagger-UI is broken · Issue #7015 - GitHub
One of your dependencies has a bug. Is there a way to workaround it until they fix it? Maybe a way to use...
Read more >SWAGGER IS A BROKEN MOVE : r/nuzlocke - Reddit
SWAGGER IS A BROKEN MOVE. I'm doing a Gold randomized run. Well, I was. Random Trainer mons, random moves, the whole shebang.
Read more >Swagger is not Working Asp.net Core how to open swagger ui
1. "its not working"... · spender The application is working fine one localhost/Acquirer/Dashboard i just want to go to swagger ui. – Asad...
Read more >Broken Swagger - Album by P-Ro - Spotify
Broken Swagger. P-Ro. 202112 songs, 35 min 36 sec. 1. The Getup (Intro)P-Ro, CloaqxDagger. 2. Fight BackP-Ro, CloaqxDagger. 3. Salma HayekP-Ro, CloaqxDagger.
Read more >Swagger Inspector not working - SmartBear Community
I'm trying to use Swagger Inspector to generate some OpenAPI files. The tool is throwing a number of errors in the console, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Attached is the code (in Go) I’ve attempted to use to resolve the duplicated operationIds through heuristics. It seems to work rather well, but I am unsure how to resolve the multiple body parameters:
Closed as stale. Please open a new issue if it’s still relevant to the maintained versions.
Now the swagger files are hosted under https://pulsar.apache.org/swagger/ and I can read https://pulsar.apache.org/admin-rest-api pages that generated from the swagger file properly.
Please create a new issue and provide a reproduce if those files still don’t work for your concrete use case.