openapi-generators / openapi-generators/openapi-python-client
Missing references in API generation process
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 2k
- Forks
- 293
- Merge medio
- 34 min
- PR fusionados (30 d)
- 1
Descripción
Describe the bug
While trying to generate the OpenAPI client, I come across a bug that not only modifies several files unnecessarily but also displays a warning message about endpoint generating, which root cause is unclear to me:
Warning(s) encountered while generating. Client was generated, but some pieces may be missing
WARNING parsing POST /index/create within index. Endpoint will not be generated.
Could not find reference in parsed models or enums
Unable to process schema /components/schemas/Index:
Value {'object_type': 'IndexParams', 'nlist': 128} is not valid, only None is allowed
Failure to process schema has resulted in the removal of:
/components/schemas/Index
/components/schemas/IndexInSpec
Schema(title=None, multipleOf=None, maximum=None, exclusiveMaximum=None, minimum=None, exclusiveMinimum=None, maxLength=None, minLength=None, pattern=None, maxItems=None, minItems=None, uniqueItems=None, maxProperties=None, minProperties=None, required=None, enum=None, const=None, type=None, allOf=[], oneOf=[Reference(ref='#/components/schemas/IndexParams'), Schema(title=None, multipleOf=None, maximum=None, exclusiveMaximum=None, minimum=None, exclusiveMinimum=None, maxLength=None, minLength=None, pattern=None, maxItems=None, minItems=None, uniqueItems=None, maxProperties=None, minProperties=None, required=None, enum=None, const=None, type=<DataType.NULL: 'null'>, allOf=[], oneOf=[], anyOf=[], schema_not=None, items=None, properties=None, additionalProperties=None, description=None, schema_format=None, default=None, nullable=False, discriminator=None, readOnly=None, writeOnly=None, xml=None, externalDocs=None, example=None, deprecated=None)], anyOf=[], schema_not=None, items=None, properties=None, additionalProperties=None, description=None, schema_format=None, default={'object_type': 'IndexParams', 'nlist': 128}, nullable=False, discriminator=Discriminator(propertyName='object_type', mapping=None), readOnly=None, writeOnly=None, xml=None, externalDocs=None, example=None, deprecated=None)
OpenAPI Spec File
A link to an OpenAPI document which produces this issue. Ideally, write a minimal reproduction only containing the problematic pieces.
Creating the new client: https://github.com/openapi-generators/openapi-python-client?tab=readme-ov-file#create-a-new-client
Desktop (please complete the following information):
- OS: Windows 11 Enterprise Version 22H2
- Python Version: 3.9.13
- openapi-python-client version: 0.17.2
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con las instrucciones de create-a-new-client vinculadas en el issue y reproduce la advertencia utilizando el proceso de generación del cliente OpenAPI indicado. Investiga por qué se eliminan las referencias a Index, IndexInSpec e IndexParams y, después, confirma que la generación finaliza sin la advertencia y conserva esos esquemas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- openapi, python
- Área
- api, tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 28/100