Not that it should make a difference, but which version of swagger-ui do you use?
From: <[email protected]> on behalf of Justin Andrews <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Thursday, 20 April 2017 at 18:33 To: Swagger <[email protected]> Subject: Re: How to resolve Swagger error “instance type (string) does not match any allowed primitive type…” 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]> on behalf of Justin Andrews <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Tuesday, 18 April 2017 at 22:30 To: Swagger <[email protected]> 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. -- 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.
