That is the part that is curious to me as well.  I copied the Swagger from 
the provided URL on the Swagger UI.  When I paste it into the Swagger 
online editor it is validated with no errors.  When I run it locally (via 
IIS) I get the error referenced above.  This is a pretty basic 
implementation at this time.  I've created a new WebApi project and added 
swagger.  That's pretty much it...  

The only thing I can surmise is that modifying my local hosts file to spoof 
the header is causing some type of issue.  I'm seriously at a loss here...

On Thursday, April 20, 2017 at 6:55:18 AM UTC-4, Ron wrote:
>
> Hi Justin,
>
>  
>
> I just tried the provided spec, and I’m not getting any errors, so it’s a 
> bit curious. 
>
> Is the provided spec exactly what you have?
>
>  
>
>  
>
>  
>
> *From: *<[email protected] <javascript:>> on behalf of 
> Justin Andrews <[email protected] <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Tuesday, 18 April 2017 at 22:30
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *How to resolve Swagger error “instance type (string) does not 
> match any allowed primitive type…”
>
>  
>
> swagger: '2.0'
> info:
>   version: v1
>   title: Generic.Public.Api
> host: publicapiurl.domain.com
> schemes:
>   - http
> paths:
>   /api/Values:
>     get:
>       tags:
>         - Values
>       operationId: Values_Get
>       consumes: []
>       produces:
>         - application/json
>         - text/json
>         - application/xml
>         - text/xml
>       responses:
>         '200':
>           description: OK
>           schema:
>             type: array
>             items:
>               type: string
>     post:
>       tags:
>         - Values
>       operationId: Values_PostByvalue
>       consumes:
>         - application/json
>         - text/json
>         - application/xml
>         - text/xml
>         - application/x-www-form-urlencoded
>       produces: []
>       parameters:
>         - name: value
>           in: body
>           required: true
>           schema:
>             type: string
>       responses:
>         '204':
>           description: No Content
>   '/api/Values/{id}':
>     get:
>       tags:
>         - Values
>       operationId: Values_GetByid
>       consumes: []
>       produces:
>         - application/json
>         - text/json
>         - application/xml
>         - text/xml
>       parameters:
>         - name: id
>           in: path
>           required: true
>           type: integer
>           format: int32
>       responses:
>         '200':
>           description: OK
>           schema:
>             type: string
>     put:
>       tags:
>         - Values
>       operationId: Values_PutByidvalue
>       consumes:
>         - application/json
>         - text/json
>         - application/xml
>         - text/xml
>         - application/x-www-form-urlencoded
>       produces: []
>       parameters:
>         - name: id
>           in: path
>           required: true
>           type: integer
>           format: int32
>         - name: value
>           in: body
>           required: true
>           schema:
>             type: string
>       responses:
>         '204':
>           description: No Content
>     delete:
>       tags:
>         - Values
>       operationId: Values_DeleteByid
>       consumes: []
>       produces: []
>       parameters:
>         - name: id
>           in: path
>           required: true
>           type: integer
>           format: int32
>       responses:
>         '204':
>           description: No Content
> definitions: {}
>

-- 
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