You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the below pet.yaml definition, when the favorite property of the Tag object is defined first, the XML example is generated correctly. When the favorite property is last, the following error is thrown:
javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1584)
at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1613)
at com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:231)
at io.swagger.oas.inflector.examples.XmlExampleSerializer.writeTo(XmlExampleSerializer.java:160)
at io.swagger.oas.inflector.examples.XmlExampleSerializer.writeTo(XmlExampleSerializer.java:81)
at io.swagger.oas.inflector.examples.XmlExampleSerializer.writeTo(XmlExampleSerializer.java:135)
at io.swagger.oas.inflector.examples.XmlExampleSerializer.writeTo(XmlExampleSerializer.java:81)
at io.swagger.oas.inflector.examples.XmlExampleSerializer.serialize(XmlExampleSerializer.java:39)
at MakeSwaggerExamples.main(MakeSwaggerExamples.java:61)
Exception in thread "main" java.lang.NullPointerException
at java.io.StringReader.<init>(StringReader.java:50)
at MakeSwaggerExamples.main(MakeSwaggerExamples.java:67)
Pet:
type: object
required:
- name
- photoUrls
properties:
id:
type: integer
format: int64
category:
$ref: './category.yaml#/Category'
name:
type: string
example: doggie
photoUrls:
type: array
xml:
name: photoUrl
wrapped: true
items:
type: string
tag:
type: array
xml:
name: tags
wrapped: true
items:
$ref: '#/Tag'
xml:
name: tag
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
xml:
name: Pet
Tag:
type: object
properties:
favorite:
type: boolean
xml:
attribute: true
id:
type: integer
format: int64
name:
type: string
xml:
name: tag
The text was updated successfully, but these errors were encountered:
Given the below pet.yaml definition, when the
favorite
property of theTag
object is defined first, the XML example is generated correctly. When thefavorite
property is last, the following error is thrown:The text was updated successfully, but these errors were encountered: