-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Hello
Problem statement
I have api endpoint in my app. Interface was generated from rest-api.yaml:
swagger: '2.0'
info:
title: inv REST API
description: inv
version: 1.0.0
contact:
name: lbn@sap.com
schemes:
- https
produces:
- application/json
paths:
/inv/v1/invApi:
post:
operationId: createInv
summary: Public API for inv
description: |
Create a new inv
tags:
- Inv
parameters:
- name: inv
in: body
description: A inv
required: true
schema:
$ref: '#/definitions/InvRest'
responses:
'201':
description: inv is created
'400':
description: Malformed payload
schema:
type: array
items:
$ref: '#/definitions/Error'
'409':
description: Error during validation
schema:
type: array
items:
$ref: '#/definitions/Error'
definitions:
InvRest:
type: object
required:
- InvID
properties:
InvID:
type: string
maxLength: 3
On making requests if InvID provided in payload everything works fine.
But if it isn't provided in payload I expect to get 400 response code and message that InvID is not provided.
But I get 405 Method Not Allowed.
Environment
swagger version: '2.0'
java 8
spring boot
Metadata
Metadata
Assignees
Labels
No labels