Cheers, worked it out now!

On Friday, December 2, 2016 at 10:39:48 PM UTC, Ron wrote:
>
> They’re allowed – they’re part of the schema.
>
>  
>
>  
>
> *From: *<[email protected] <javascript:>> on behalf of 
> Jennifer Smith <[email protected] <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Friday, 2 December 2016 at 8:36
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *How do you add fields such as maxLength to a parameter that is 
> classed as "in: body"?
>
>  
>
> Hi, 
>
>  
>
> I'm writing the content around our API services, but I'm unable to use the 
> list of fields mentioned in the swagger specification content because they 
> are not allowed when the value of 'in:' is set to 'body'.
>
> Has anybody worked around this so that you can specify the maxLength of 
> the parameters in the body?
>
> Here's an example of the YAML structure I'm working on:
>
>  
>
> paths:
>
>   "/pigeon/sendemail":
>
>     post:
>
>       tags:
>
>       - Pigeon
>
>       description: > Send an email.   
>
>       operationId: SendPigeonEmail
>
>       *parameters:*
>
> *      - name: data*
>
> *        in: body*
>
> *        required: true*
>
> *        schema:*
>
> *          "$ref": "#/definitions/RapidBody"*
>
>       responses:
>
>         '200':
>
>           description: success
>
>           schema:
>
>             "$ref": "#/definitions/PigeonSuccess"
>
>           headers:
>
>             Content-Type:
>
>               type: string
>
>             Content-Length:
>
>               type: integer
>
>             Cache-Control:
>
>               type: string
>
>         '400':
>
>           description: Already processed batch
>
>           schema:
>
>             "$ref": "#/definitions/PigeonProcessedBatch"
>
>           headers:
>
>             Content-Type:
>
>               type: string
>
>             Content-Length:
>
>               type: integer
>
>             Cache-Control:
>
>               type: string
>
>         default:
>
>           description: Unexpected error
>
>           schema:
>
>             "$ref": "#/definitions/GlobalErrorResponse"
>
>  
>
> *RapidBody*:
>
>    * required:*
>
> *    - schedule*
>
> *    - batch_id*
>
> *    - recipients*
>
> *    properties:*
>
> *      schedule:*
>
> *        type: string*
>
> *      batch_id:*
>
> *        type: string*
>
>       recipients:
>
>         "$ref": "#/definitions/RecipientFields"
>
>   RecipientFields:
>
>     required:
>
>     - email
>
>     - firstname
>
>     - ordernumber
>
>     properties:
>
>       email:
>
>         type: string
>
>       firstname:
>
>         type: string
>
>       titlelastname:
>
>         type: string
>
>       ordernumber:
>
>         type: integer
>
> -- 
> 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.

Reply via email to