Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is a Swagger spec available? #76

Open
loganlinn opened this issue Oct 9, 2018 · 3 comments
Open

Is a Swagger spec available? #76

loganlinn opened this issue Oct 9, 2018 · 3 comments

Comments

@loganlinn
Copy link

The documentation says that the Java and Python libraries in this repo are based on Swagger. Is there a Swagger JSON or YAML spec that could be used to generate a client in another language?

My current CM install doesn’t expose API Explorer/Swagger UI under the Support menu; just has API Documentation.

@bbhavsar
Copy link
Contributor

bbhavsar commented Oct 10, 2018

Cloudera Manager API client released with Cloudera Manager 6.0, not the one in this repo, is indeed generated using Swagger.

You can find more information about new Swagger based Cloudera Manager API Client here
https://cloudera.github.io/cm_api/docs/python-client-swagger/

On a running Cloudera Manager instance, swagger input specification json is available at http://cm-host:7180/static/apidocs/ui/swagger.json

In future for those who don't have access to a running Cloudera Manager instance, we'll link the swagger input specification from static site http://cloudera.github.io/cm_api/docs/releases/

@Smithx10
Copy link

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#operationObject

The Spec isn't valid.

operationId must be Unique Globally.

arch@9d46dd2d-1178-ce83-cbc4-d396e4a24060 ~/g/s/g/b/go-cdm ❯❯❯ ./swagger_linux_amd64 generate  client swagger.json                                                                                                                      ✘ 1
2020/04/10 14:24:30 validating spec /home/arch/go/src/git.bdf-cloud.iqvia.net/bdf-cloud/go-cdm/swagger.json
The swagger spec at "/home/arch/go/src/git.bdf-cloud.iqvia.net/bdf-cloud/go-cdm/swagger.json" is invalid against swagger specification 2.0. see errors :
- "readRoleConfigGroups" is defined 3 times
- "deleteRole" is defined 3 times
- "updateRoleConfig" is defined 3 times
- "readHistory" is defined 2 times
- "readRoleConfigGroup" is defined 3 times
- "listRoleTypes" is defined 3 times
- "startCommand" is defined 7 times
- "readRoles" is defined 6 times
- "createRoles" is defined 3 times
- "zooKeeperCleanupCommand" is defined 2 times
- "getFullLog" is defined 3 times
- "updateConfig" is defined 6 times
- "getStandardError" is defined 3 times
- "getStandardOutput" is defined 3 times
- "jmapHisto" is defined 2 times
- "updateServiceConfig" is defined 3 times
- "readRoleConfig" is defined 3 times
- "inspectHostsCommand" is defined 2 times
- "restartCommand" is defined 7 times
- "stopCommand" is defined 7 times
- "rollingRestart" is defined 2 times
- "getStacksLogsBundle" is defined 3 times
- "readService" is defined 3 times
- "firstRun" is defined 2 times
- "updateRoleConfigGroup" is defined 3 times
- "lsof" is defined 2 times
- "getClientConfig" is defined 2 times
- "exitMaintenanceMode" is defined 8 times
- "jmapDump" is defined 2 times
- "autoConfigure" is defined 3 times
- "readAuthRolesMetadata" is defined 2 times
- "autoAssignRoles" is defined 3 times
- "jstack" is defined 2 times
- "queryTimeSeries" is defined 2 times
- "getMetrics" is defined 5 times
- "zooKeeperInitCommand" is defined 2 times
- "readConfig" is defined 5 times
- "readServiceConfig" is defined 3 times
- "readRole" is defined 3 times
- "listActiveCommands" is defined 8 times
- "enterMaintenanceMode" is defined 8 times
- "getKerberosInfo" is defined 2 times
- "getStacksLog" is defined 3 times

@Smithx10
Copy link

Smithx10 commented Apr 11, 2020

That example was wit go-swagger.

It seems https://github.com/swagger-api/swagger-codegen is a little bit less strict on following the API standard and resulted in something that needed less modifications before becoming usable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants