Forum Discussion
Is it a valid Swagger 2.0 Specification? Currently, we support 2.0 specifications to be published and not 3.0. However, the editor will parse a swagger 3.0 with no errors.
If that doesn’t fix the issue, can you share your swagger specification here?
- jsmith1414 years agoNew Contributor III
It should be Swagger 2.0. Here is the specification file. I have changed “basePath” to share on community
james_pipeline_to_api_spec.txt (3.5 KB)
- cjhoward184 years agoEmployee
Okay, I have identified the issue with the specification provided.
Let me explain in a few steps:
one the validate call to validate your specification shows the error:
From there you can see the type of your parameter
putId
is a string however it has aitems
field describing it as an array, and the default is not a string. So, this is mixing the type of a string with the definition of an array type.I modified your specification only to change the type of the mentioned parameter to an array instead of a string.
If you would like it to be a string then the definition should not include the
items
description.here is the modified spec that is now validating successfully for me after changing the type:
paramsTypeToArray.txt (3.5 KB)