swagger-markdown
swagger-markdown copied to clipboard
Properties in response not shown when schema type is "object" having one array property
swagger-markdown version 1.2.0
Input
---
swagger: "2.0"
host: "0.0.0.0:11116"
basePath: "/"
schemes:
- "http"
info:
title: "REST API"
version: "1"
tags: []
paths:
/v1/notifications/account/{accountId}:
get:
summary: "Retrieves all notifications for given accountId."
operationId: "getV1NotificationsAccountAccountid"
parameters:
-
type: "integer"
name: "accountId"
in: "path"
required: true
-
type: "array"
description: "Optional properties to filter by. Can be multiple."
x-constraint:
single: true
items:
type: "string"
enum:
- "read"
- "completed"
collectionFormat: "multi"
name: "skip"
in: "query"
required: false
tags:
- "v1"
responses:
200:
schema:
type: "object"
properties:
data:
type: "array"
items:
type: "object"
properties:
notificationId:
type: "integer"
description: "ID of the notification"
description: "Successful"
Output
Notice for the Responses, the Schema column says only 'object' instead of saying it's an array of integers.
# REST API
## Version: 1
### /v1/notifications/account/{accountId}
#### GET
##### Summary:
Retrieves all notifications for given accountId.
##### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ---- |
| accountId | path | | Yes | integer |
| skip | query | Optional properties to filter by. Can be multiple. | No | [ string ] |
##### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Successful | object |
It doesn't seem to be related to array - this is just one example.
:tada: This issue has been resolved in version 2.0.0-beta.7 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 2.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Will Examples in responses be displayed ? at the moment it seems it cannot
@matthiasg we do have it in fact. I just updated the example, check it here: https://github.com/syroegkin/swagger-markdown/blob/master/examples/petstore_simple.md#petsid If you have issues with your documents, please submit an issue with an example, it will make it easier for me to resolve it.