Change "paramType" to "in" for starters. I suggest checking syntax with 
http://editor.swagger.io

> On Aug 8, 2016, at 9:54 AM, Benjamin SOULAS <benjamin.soula...@gmail.com> 
> wrote:
> 
> Hello people, I am trying to generate my own REST server in python Flask 
> framework, actually I only have a GET method and a POST one.
> 
> But the POST method IS the problem about paramters which seems not to 
> correspond to the YAML Syntax in Swagger. The idea, I need the template ID 
> which is into the path and a config in a JSON parameter (is it in body? 
> query? Maybe this is it the problem?).
> 
> Here is my .YAML file:
> 
> # Example YAML to get you started quickly.
> # Be aware that YAML has indentation based scoping.
> # Code completion support is available so start typing for available options.
> swagger: '2.0'
> 
> # This is your document metadata
> info:
>   version: "0.0.0"
>   title: <jitter api>
> 
> # Describe your paths here
> paths:
>   /v0/templates:
>     get:
>       description:
>         Get the templates list
>       produces:
>         - application/json
>       responses:
>         "200":
>           description: Successful response
>           schema:
>             title: ArrayOfTemplates
>             type: array
>             items:
>               type: object
>               properties:
>                 templateId:
>                   type: string
>                 description:
>                   type: string
>   /v0/application/new/{templateId}:
>     post:
>       description: |
>         Get the templates list
>       consumes:
>         - application/json
>       produces:
>         - application/json
>       parameters:
>         - name: templateId
>           description: Template's Id
>           required: true
>           type: string
>           paramType: path
>         - name: config
>           description: Config in which we will define the encoder's number do 
> deploy
>           required: true
>           paramType: query
>           type: object
>           properties:
>             encoders_count: 
>               type: integer
>               format: int32
>       responses:
>         "200":
>           description: Successful response
>           schema:
>             title: object of the app infos
>             type: object
>             items:
>               type: object
>               properties:
>                 appId:
>                   type: string
>                 templateId:
>                   type: string
>                 config:
>                   type: object
>                   properties:
>                     encoders_count:
>                       type: integer
>                       format: int32
> -- 
> 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-swaggersocket+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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

Reply via email to