[Bug]: 2.1.48 2xx response written as $ref: '#/components/responses/X' generates void.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- api, backend-api-design
Línea de trabajo
Start by locating how swagger-parser resolves $ref values under components/responses and how the resolved response schema reaches generated return types; the payload names no source files or tests. Compare parsing the referenced 202 response with the inline response schema shown in the report. Done means the referenced response retains its typed return value instead of producing void.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
2xx responses written as $ref: '#/components/responses/X' generate void / ApiResponse<Void>.
Affected Version
2.1.48
Steps to Reproduce
responses:
202:
$ref: '#/components/responses/RequestAcceptedResponse'
generates
/**
* Does a thing
* @param thing ID
* @throws ApiException If API call fails
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> </td><td> - </td></tr>
<tr><td> 0 </td><td> </td><td> - </td></tr>
</table>
*/
public void doAThing(String thingID) throws ApiException {
doAThingWithHttpInfo(thingID);
}
responses:
202:
description: Request accepted. Confirmation of success/failure of request to be sent asynchronously via SNS.
content:
application/json:
schema:
$ref: '#/components/schemas/responseBody'
generates the expected response type.
Expected Behavior
parsing should not cause typed object references to generate void returns in client code
Actual Behavior
typed object references in the swagger schema generate void returns in client code
Environment
- Java version: JDK 17
- Build tool: Gradle 7.x, 8.x
- OS: AmazonLinux2 x86_64
Additional Context
NA
Checklist
- I have searched the existing issues and this is not a duplicate.
I've searched, but don't often work with swagger and don't have full visibility into the build toolchain being run.
If this smells like a duplicate to the maintainers, please feel free to resolve.
- I have provided sufficient information for maintainers to reproduce the issue.
As above, made my best effort in the time available.
- Lenguaje dominante
- Java
- Estrellas
- 870
- Forks
- 566
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 swagger-api/swagger-parser
-
InlineModelResolver.uniqueName throws StringIndexOutOfBoundsException for titles starting with a separator (camelCaseFlattenNaming)Posiblemente ocupada @arimu1 la tomó hace 57 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
swagger-api/swagger-parser#2386 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
swagger-api/swagger-parser#2168 ·
-
ResolveFully fails on internal references when the initial spec is read from a file URLPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
swagger-api/swagger-parser#1922 · 2 comentarios · 1 reacción ·
-
[Bug]: Discriminator mapping of a oneOf nested in array items gets a null key and is no longer updated after external ref resolution (regression since 2.1.36)Posiblemente ocupada @wyhasany la tomó hace 12 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
swagger-api/swagger-parser#2406 · 1 comentario ·
-
[Question]: Guidance on jackson-coreutils vulnerabilities in legacy Swagger compatibility dependencyAbiertoQuestion
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
swagger-api/swagger-parser#2405 ·
Todos los issues de swagger-api/swagger-parser
Issues similares
-
agent:working follow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Sanne/incus-spawn#1683 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
checkstyle/checkstyle#22210 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
521xueweihan/HelloGitHub#4105 ·
-
devops good first issue security
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
asciidoctor/asciidoctorj#1339 ·