Use of "security" attribute in POST payloads

10 views
Skip to first unread message

Alexei

unread,
Jun 29, 2017, 5:13:06 AM6/29/17
to Swagger
I have a simple API, that accepts JSON payload, and among attributes of the payload I have one with name "security". 
A sample for the POST payload schema:
definitions:
  someSchema:
    description: My schema description
    type: object
    properties:
      propertyOne:
        type: string
      propertyTwo:
        type: string
      security:
        type: object
        properties:
          propertyOne:
            type: string


When the API is described by Swagger 2.0, it doesn't pass the validation, as it somehow interprets an attribute from my payload as an API's properties attribute.

What's wrong with having a payload attribute, named security?


sampleSwagger.yaml

Ron Ratovsky

unread,
Jun 29, 2017, 11:38:16 AM6/29/17
to swagger-sw...@googlegroups.com

Are you talking about swagger-editor?

--
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 swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ALEKSEI MOKEEV

unread,
Jun 29, 2017, 11:43:34 AM6/29/17
to swagger-sw...@googlegroups.com
Yes, exactly. Screenshot:

 
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/iwbjam3AV1Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.

Ron Ratovsky

unread,
Jun 29, 2017, 11:51:05 AM6/29/17
to swagger-sw...@googlegroups.com

ALEKSEI MOKEEV

unread,
Jun 29, 2017, 11:54:25 AM6/29/17
to swagger-sw...@googlegroups.com
Thanks a lot for the quick turnaround. 

On 29. Jun 2017, at 17:50, Ron Ratovsky <r...@swagger.io> wrote:

 
 
 
From: <swagger-sw...@googlegroups.com> on behalf of ALEKSEI MOKEEV <aleksei....@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Thursday, 29 June 2017 at 8:43
To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Subject: Re: Use of "security" attribute in POST payloads
 
Yes, exactly. Screenshot: 
 
 <image002.png>
<image002.png>

Reply all
Reply to author
Forward
0 new messages