Custom type and deserialization into this type
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- openapi, typescript
Línea de trabajo
Start with the OpenAPI schema snippet and the generated TypeScript output described in the issue, then trace how custom format values are currently represented and how fetched responses are deserialized. Done should define how a custom format maps to an imported TypeScript type and how runtime responses are converted into that type, including the required configuration and tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is there a way to use a custom types in the schema file? And deserialize from string into this type at runtime?
I have the OpenAPI spec like this (just a snippet):
{
"components": {
"schemas": {
"SomeModel": {
"type": "object",
"properties": {
"someProperty": {
"type": "string",
"format": "MyCustomType"
}
}
}
}
}
}
Which will generate this into the schema file:
export type SomeModel = {
/**
* @format MyCustomType
*/
someProperty: string;
}
But I want to have it like this:
import {MyCustomType} from 'some-library';
export type SomeModel = {
someProperty: MyCustomType;
}
And deserializing the fetched response during runtime into the MyCustomType
- 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ó hoy. 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 44 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
-
Bump Firebase JS SDK (12.19.0 → 13.0.0)Posiblemente ocupada @SelaseKay la tomó hoy. AbiertoNeeds Attention type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
invertase/react-native-firebase#9364 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 4 días
-
[fullsend] E2E: rhdh-version-override — run-e2e.sh overrides RHDH_VERSION to non-existent 2.1Abiertoe2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
redhat-developer/rhdh-plugin-export-overlays#4261 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug] 官网文档的图片挂了Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
area:cli bug triage:in-progress
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día