Skip to content

Instantly share code, notes, and snippets.

@justinedelson
Last active September 27, 2021 13:44
Show Gist options
  • Save justinedelson/62cf6b837096347cdc307efc7ab610ca to your computer and use it in GitHub Desktop.
Save justinedelson/62cf6b837096347cdc307efc7ab610ca to your computer and use it in GitHub Desktop.
Issue reproducing no descriptions on properties with referenced schemas
swagger: '2.0'
info:
description: This is a simple API
version: 1.0.0
title: Simple API
# tags are used for organizing operations
tags:
- name: admins
description: Secured Admin-only calls
paths:
/testA:
post:
tags:
- admins
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: inlineItem
description: The inline item
schema:
$ref: '#/definitions/TestItemA'
responses:
201:
description: item created
/testB:
post:
tags:
- admins
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: inlineItem
description: The ref item
schema:
$ref: '#/definitions/TestItemB'
responses:
201:
description: item created
definitions:
TestItemA:
type: object
description: First Test Item
properties:
inline:
type: object
description: An inline schema
properties:
refProp:
type: string
description: Some property
TestItemB:
type: object
description: Second Test Item
properties:
ref:
description: A property containing a referenced schema
$ref: '#/definitions/TestRef'
TestRef:
type: object
description: A referenced schema
properties:
refProp:
type: string
description: Some property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment