Skip to content

Instantly share code, notes, and snippets.

@jpret
Created August 30, 2021 13:07
Show Gist options
  • Select an option

  • Save jpret/63604cf0a14157c5ac9f387ca3aba4f1 to your computer and use it in GitHub Desktop.

Select an option

Save jpret/63604cf0a14157c5ac9f387ca3aba4f1 to your computer and use it in GitHub Desktop.
Swagger - XML Element with Attributes + Content Example
swagger: "2.0"
info:
description: "XML Element with Attributes + Content Example"
title: "Example"
version: "42"
paths:
/foo:
get:
tags:
- "foo"
produces:
- "application/xml"
responses:
"200":
description: "successful operation"
schema:
$ref: "#/definitions/Person"
definitions:
Person:
type: "object"
title: "Person"
properties:
content:
type: "object"
example: "foo"
id:
type: "string"
example: "bar"
xml:
attribute: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment