[Bug]: 2.1.48 2xx response written as $ref: '#/components/responses/X' generates void.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- api, backend-api-design
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 870
- Fork
- 565
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di swagger-api/swagger-parser
-
InlineModelResolver.uniqueName throws StringIndexOutOfBoundsException for titles starting with a separator (camelCaseFlattenNaming)Forse già presa @arimu1 l’ha presa 54 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
swagger-api/swagger-parser#2386 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
swagger-api/swagger-parser#2168 ·
-
ResolveFully fails on internal references when the initial spec is read from a file URLForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
swagger-api/swagger-parser#1922 · 2 commenti · 1 reazione ·
-
[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)Forse già presa @wyhasany l’ha presa 9 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
swagger-api/swagger-parser#2406 · 1 commento ·
-
[Question]: Guidance on jackson-coreutils vulnerabilities in legacy Swagger compatibility dependencyApertaQuestion
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
swagger-api/swagger-parser#2405 ·
Tutte le issue di swagger-api/swagger-parser
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
checkstyle/checkstyle#22145 ·
I maintainer di solito rispondono entro 1 giorno
-
rset command throws NPE in ResultsFormat.guessSyntaxForse già presa @Ostrzyciel l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
objectionary/eo#9593 ·
I maintainer di solito rispondono entro 1 giorno
-
release bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenLiberty/open-liberty#36124 ·
I maintainer di solito rispondono entro 1 giorno