Cannot generate Enums from Dictionary Object
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- devtools
Línea de trabajo
Start with the provided OpenAPI dictionary schema and compare enum generation with useEnums set to false and true. Trace the generator path handling additionalProperties and allOf, then verify that the generated TypeScript references a defined enum like the regular-object output rather than undefinedTest.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The useEnum option is a great addition! Super happy that got in. Trying it out I ran into an edge case when generating enums from a Dict object. Given the schema:
{
"Test": {
"additionalProperties": {
"properties": {
"test": {
"enum": [
"A",
"B"
],
"type": "string"
}
},
"required": [
"test"
],
"type": "object"
},
"properties": {},
"type": "object"
}
}
With useEnums: false:
export type Test = {
[key: string]: {
test: 'A' | 'B'
}
}
With useEnums: true:
export type Test = {
[key: string]: {
test: undefinedTest
}
}
with a regular object
"Test": {
"properties": {
"test": {
"enum": [
"A",
"B"
],
"type": "string"
}
},
"required": [
"test"
],
"type": "object"
}
export enum TestTest {
A = 'A',
B = 'B',
}
export type Test = {
test: TestTest
}
Was also able to duplicate the same behavior when using allOf which makes me think #157 is related
- Lenguaje dominante
- TypeScript
- Estrellas
- 634
- Forks
- 83
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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.
Más de fabien0102/openapi-codegen
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fabien0102/openapi-codegen#343 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fabien0102/openapi-codegen#342 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
fabien0102/openapi-codegen#356 ·
-
update dependencies & removed unused deprecatedPosiblemente ocupada @el-j la tomó hace 1 día. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
fabien0102/openapi-codegen#354 ·
-
deepMerge mutates its arguments, corrupting request payloads across callsPosiblemente ocupada @richard-willis-chevin la tomó hace 45 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
fabien0102/openapi-codegen#349 ·
Todos los issues de fabien0102/openapi-codegen
Issues similares
-
bug(sight): the dashboard's text truncations split surrogate pairs and show broken charactersAbiertocomponent:sight
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
agentic-os-org/ANOLISA#6738 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug Durable Agents Observability (AI Telemetry) status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
mastra-ai/mastra#26470 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
paperclipai/paperclip#15630 ·
Los mantenedores suelen responder en 1 día
-
[good first issue, hacktoberfest] ⛩️ Add new Theme: Sakura Latte (good-first-issue)Posiblemente ocupada @PGrayCS la tomó hoy. Abiertocommunity first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
lingdojo/kana-dojo#31937 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
feature/cohorts feature/feature-flags team/feature-flags
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día