-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Open
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
Description
With #21899 and #21913 we introduced a wrapped xml feature/fix regarding wrapped elements in golang.
However we did a small mistake with the spec. You don't define the name of the element beside wrapped, that is the name of the list. The element must be named with xml at the element by itself.
wrong:
photoUrls:
items:
type: string
type: array
xml:
name: photoUrl
wrapped: trueright:
photoUrls:
items:
type: string
xml:
name: photoUrl
type: array
xml:
wrapped: trueopenapi-generator version
head
OpenAPI declaration file content or url
spec in repo / can be found in #21913
Generation Details
check prs
Steps to reproduce
copy current file in swagger editor and validate wrong wrapping:
this is the right wrapping used:
Related issues/PRs
- feat(golang): support for wrapped and xml name #21899
- Add tests for withXml option in Go client generator #21913