Digite o código aqui...
Hi,
I am trying to turn on automatic payload validation on Swagger Inflector.
I put the 'validatePayloads: true' on my inflector.yaml file.
This is a snippet of my swagger.yaml file
groups:
get:
tags:
- groups
x-swagger-router-controller: GroupApi
operationId: getGroups
summary: Get groups list
parameters:
- in: header
name: clientoid
type: string
description: 'Unique key identifier for client'
required: true
responses:
200:
description: Success response
schema:
items:
$ref: '#/definitions/Group'
This is the Group object definition:
definitions:
Group:
required:
- groupoid
- name
properties:
groupoid:
type: string
name:
type: string
terminated:
type: string
On my implementation, I am purposefully not returning a groupoid field, but
no erros are being throw:
Response Code 200
[
{ "name": "Standard Practitioners" },
{ "name": "Custom Group 1" }
]
What I am missing to make Swagger validate my response payloads?
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.