swagger-api / swagger-api/swagger-core
XML: No way to have an object with both attribute and element value
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7.5k
- Forks
- 2.3k
- Avg merge
- 18h 1m
- Merged PRs (30d)
- 10
Description
XML: No way to have an object with both attribute and element value
e.g.
Some text
This is a revival of this issue from OpenAPI years ago:
https://github.com/OAI/OpenAPI-Specification/issues/630
I can define a object that has attributes, and some that have element values but not both.
Simple solution would be:
AttributeObject:
type: object
properties:
name:
type: string
example: 'eventName'
xml:
attribute: true
data:
type: string
example: 'myvalue'
xml:
elementValue: true
xml:
name: 'attribute'
Something like this should produce:
myvalue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the XML example and the revived OpenAPI issue 630 to understand the requested attribute-plus-element-value behavior. No repository file or test is named; done means defining and supporting an object that serializes as myvalue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100