Hi Ron,
Yes I saw that later, if that could be useful for someone, here is my yaml
file with the correct syntax:
# 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
operationId: newApplication
consumes:
- application/json
produces:
- application/json
parameters:
- in: path
name: templateId
type: string
required: true
- in: body
name: config
required: true
description: encoders needed to be implemented
schema:
$ref: '#/definitions/template'
responses:
"200":
description: Successfull 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
definitions:
template:
type: object
properties:
encoders_count:
type: integer
format: int32
Thank you very much !!!
Le mardi 9 août 2016 01:06:22 UTC+2, Ron a écrit :
>
> You defined your query parameter as an object, but query parameters can
> only be primitives.
>
> Only body parameters can
>
>
>
> be objects.
>
>
>
> *From: *<[email protected] <javascript:>> on behalf of
> Benjamin SOULAS <[email protected] <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Monday, 8 August 2016 at 01:57
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *Re: Swagger throws “Swagger Error Not a valid parameter
> definition”
>
>
>
> Still the same problem, maybe I missunderstood the way to handle POST
> request? Here is a screenshot:
>
> --
> 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] <javascript:>.
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.