array return types get assigned names that contain special characters, breaking tooling
Maintainer antworten meist innerhalb von 9 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- java, openapi, spring, spring-boot
- Bereich
- api, backend-api-design
Rechercherichtung
Start by tracing how springdoc derives OpenAPI schema component names for the shown ResponseEntity<ResponseEnvelope<Foo[]>> return type, then check the related schema naming tests. Reproduce the generated ResponseEnvelopeFoo[] name and determine whether the issue calls for changing that name or adding the suggested configuration and warning. Done means the chosen behavior is covered by a regression test; the issue does not name a file or test.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
this code:
// Foo[] is BAD and breaks our action!
@GetMapping
public ResponseEntity<ResponseEnvelope<Foo[]>> getFoos() {
...
}
gets parsed into this:
"ResponseEnvelopeFoo[]": {
"type": "object",
"properties": {
"status": { "type": "string", "enum": ["OK", "ERROR"] },
"httpCode": { "type": "integer", "format": "int32" },
"data": {
"type": "array",
"items": { "$ref": "#/components/schemas/Foo" }
},
"error": { "$ref": "#/components/schemas/ErrorDetails" }
}
}
which is of course valid json and allowed by the openapi spec, but it did break my tooling and it took me a good hour to figure out what happened.
if you don't consider this a bug and don't want to break backwards compatibility for this i understand, maybe add a configuration option <entityNamesMayContainSpecialCharacters>false</entityNamesMayContainSpecialCharacters> and add a console warning if an entity like this is generated? cheers
- Vorherrschende Sprache
- Java
- Sterne
- 3.7k
- Forks
- 605
- Ø Merge
- 9 T. 11 Std.
- Gemergte PRs (30 T.)
- 14
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus springdoc/springdoc-openapi
-
enhancement upstream
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
springdoc/springdoc-openapi#3324 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 9 Tagen
-
enhancement upstream
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
springdoc/springdoc-openapi#3309 · 4 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 9 Tagen
Alle Issues in springdoc/springdoc-openapi
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
scylladb/scylla-cdc-source-connector#402 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ahmedmmordi/store-app#8 ·
-
jhipster heroku fails on heroku git:remote when reusing an existing app outside a git repositoryOffenarea: triage theme: undefined
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
jhipster/generator-jhipster#36018 ·
Maintainer antworten meist innerhalb von 1 Tag