danielgtaylor / danielgtaylor/openapi-cli-generator
Getting Started Issues
- Lenguaje dominante
- Go
- Estrellas
- 218
- Forks
- 54
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I want to build a cli from my company's api and I'm trying to get started with the openapi-cli-generator https://github.com/danielgtaylor/openapi-cli-generator but I'm running into some different errors.
I took the petstore demo api https://petstore.swagger.io/v2/swagger.json removed the top of the file comments and converted it to yaml using https://www.json2yaml.com/ then following the steps on the openapi-cli-generator github page, I run openapi-cli-generator generate petstore.yaml
and I get this type of error: Failed to resolve '#/definitions/Pet' in fragment in URI: 'definitions': Struct field not found: definitions which is complaining about lines like schema: "$ref": "#/definitions/Pet" in the yaml file. I tried replacing the $ref values with '' ex "$ref":"" and now I can run openapi-cli-generator generate petstore.yaml Was relacing the ref values with empty string the right thing to do? What is the nature of the problem.
Next, the git hub instructions say to add a line like openapiRegister(false) what is this supposed to do exactly? What does it mean to register a command? Are these the commands that will be part of the cli? What does the syntax look like? The github page doesn't give any examples
Is there supposed to be a one cli command per api call in the generated cli?
petstore-cli PetstoreFindPetsByStatus --help - unknown command "PetstoreFindPetsByStatus" for "petstore-cli.exe" (I need to register the command that I want?)
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Reproduzca la ejecución reportada `openapi-cli-generator generate petstore.yaml` utilizando el documento Swagger de Petstore y compárela con la compatibilidad documentada de OpenAPI del generador. Después, siga `openapiRegister(false)` y los puntos de entrada de los comandos generados para determinar cómo se registran los comandos y qué comandos deberían generarse. Se considera terminado cuando se documenten el fallo de `$ref`, la sintaxis de registro y los comandos CLI generados esperados con ejemplos funcionales.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- go, openapi
- Área
- cli, documentation
- Tipo de issue
- Documentación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100