SchemaRepository Injection into OpenAPIContract
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- java, openapi
- Área
- api, backend-api-design
Línea de trabajo
Empieza leyendo el flujo de OpenAPIContract::from y SchemaRepository dereference(), y compáralo después con la funcionalidad relacionada de vertx-json-schema mencionada en el issue. Se considera completado cuando la hidratación y la validación de esquemas se puedan reutilizar, y se pueda proporcionar un SchemaRepository hidratado previamente a OpenAPIContract::from para varios contratos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the feature
This stems from a concern that the provided interfaces prevent reuse of what should be immutable objects in memory. For context, to load up a SchemaRepository's lookup table, we need to read in our schema files and then run them through a dereference(). The OpenAPIContract class does that alongside some validation in its from() function, which is really nice.
To explain the problem, now suppose that I have multiple open api files and thus need multiple OpenAPIContracts that produce routers that are eventually attached as subrouters for the rest server. Each OpenAPIContract will have its own SchemaRepository. Also consider that someone may want a fully hydrated SchemaRepository that I want to expose to a swagger ui or arbitrary http clients (I did that with a handler on some schema route that does the lookup/resolve for the schema and returns it). Every single OpenAPIContract and the separate SchemaRepository for exposing to clients will have duplicate/immutable schemas in memory.
The feature would be to genericize the validation/repo filling (which is filled by calling dereference() on the repo) logic in OpenAPIContract::from, probably moved into the vertx-json-schema library. Then allow a SchemaRepository to be provided to OpenAPIContract::from. That would allow the hydration of a SchemaRepository and then for it to be reused everywhere it is needed.
Use cases
The big use case is the reuse of SchemaRepository's for OpenAPIContracts and also the generalization of a very useful hydration feature for loading schemas into a SchemaRepository. OpenAPIContract is not the only class that can make use of that validation/repo filling logic. The only useful logic I've seen for filling a SchemaRepository's internal lookup map is in OpenAPIContract, but that's not something that should be specific to the openapi library.
Code reuse and saving on memory usage and startup time are the real benefits. In my eyes I would say that this is necessary polish.
Contribution
Who should implement this feature ? are you volunteering for implementing this feature or
do you know that is able and willing implement this feature ?
- Lenguaje dominante
- Java
- Estrellas
- 15
- Forks
- 19
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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.
Más de eclipse-vertx/vertx-openapi
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
eclipse-vertx/vertx-openapi#137 · 5 comentarios ·
-
Add OpenAPI 3.2 supportAbiertoenhancement help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
eclipse-vertx/vertx-openapi#136 · 1 comentario ·
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
eclipse-vertx/vertx-openapi#122 · 4 comentarios ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
eclipse-vertx/vertx-openapi#117 · 6 comentarios ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
eclipse-vertx/vertx-openapi#92 · 4 comentarios ·
Todos los issues de eclipse-vertx/vertx-openapi
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
linagora/twake-calendar-side-service#1218 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug] [Go] Ack returns nil when the server answers with a non-OK statusPosiblemente ocupada @leizhiyuan la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
apache/rocketmq-clients#1465 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
pdfium-drift
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Stirling-Tools/JPDFium#188 ·
Los mantenedores suelen responder en 1 día