This repository was archived by the owner on Aug 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
This repository was archived by the owner on Aug 8, 2018. It is now read-only.
Explicit error message + support example swagger key #210
Copy link
Copy link
Open
Description
I get hard to understand errors message when I put example key in the properties of an object schema in the import swagger tool of ApiGateway web client :

This file is valid for swagger 2.0 editor.
swagger: '2.0'
info:
version: "1.0.0"
title: "ContactAPI"
host: "eample.io"
basePath: /
schemes:
- https
paths:
/contact:
post:
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: Message
required: true
schema:
$ref: '#/definitions/Message'
responses:
200:
description: "Email is sent"
definitions:
Message:
type: object
required:
- email
- subject
- message
properties:
email:
type: string
description: "Email 'From to'"
format: email
subject:
type: string
description: "Email subject"
minLength: 10
maxLength: 200
message:
type: string
description: "Email message"
minLength: 20
maxLength: 500
title: Messageswagger: '2.0'
info:
version: "1.0.0"
title: "ContactAPI"
host: "eample.io"
basePath: /
schemes:
- https
paths:
/contact:
post:
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: Message
required: true
schema:
$ref: '#/definitions/Message'
responses:
200:
description: "Email is sent"
definitions:
Message:
type: object
required:
- email
- subject
- message
properties:
email:
type: string
description: "Email 'From to'"
format: email
subject:
type: string
description: "Email subject"
minLength: 10
maxLength: 200
message:
type: string
description: "Email message"
minLength: 20
maxLength: 500
example: "My best message"
title: Message- Diff
--- bug/work.yml 2018-01-24 19:16:26.831984710 +0100
+++ bug/bug.yml 2018-01-24 19:16:53.228787830 +0100
@@ -48,4 +48,5 @@
description: "Email message"
minLength: 20
maxLength: 500
+ example: "My best message"
title: MessageReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels