Skip to content

Instantly share code, notes, and snippets.

@Sevenarth
Created June 26, 2019 08:32
Show Gist options
  • Select an option

  • Save Sevenarth/595ce008748a0fa1e43bcfcdcaffe229 to your computer and use it in GitHub Desktop.

Select an option

Save Sevenarth/595ce008748a0fa1e43bcfcdcaffe229 to your computer and use it in GitHub Desktop.
OpenAPI Codegen 4.0.2 XML name bug
openapi: 3.0.1
info:
title: XmlName bug
version: 'OpenAPI Codegen 4.0.2'
paths:
/rootArray:
post:
operationId: rootArray
requestBody:
required: true
content:
text/xml:
schema:
$ref: '#/components/schemas/Entries'
responses:
200:
description: 'OK'
/arrayInObject:
post:
operationId: arrayInObject
requestBody:
required: true
content:
text/xml:
schema:
$ref: '#/components/schemas/EntriesObject'
responses:
200:
description: 'OK'
/wholeObject:
post:
operationId: wholeObject
requestBody:
required: true
content:
text/xml:
schema:
$ref: '#/components/schemas/WholeObject'
responses:
200:
description: 'OK'
components:
schemas:
Entries:
type: array
xml:
wrapped: true
name: Entries
items:
$ref: '#/components/schemas/Entry'
Entry:
type: object
xml:
name: Entry
properties:
value:
type: string
example: '1234'
xml:
attribute: true
name: value
EntriesObject:
type: object
xml:
name: Entries
properties:
entries:
type: array
items:
$ref: '#/components/schemas/Entry'
WholeObject:
type: object
xml:
name: Entries
properties:
entries:
type: array
items:
type: object
xml:
name: Entry
properties:
value:
type: string
example: '1234'
xml:
attribute: true
name: value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment