You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am using swagger request validator library (version 2.22.0) in my project with below yaml configurations.
info:
title: Sample API
version: 1.0.0
openapi: 3.0.0
paths:
/demo/{groupIdentifier}:
get:
description: This API which will provide all the members of a group.
operationId: get-group-v2
responses:
"200":
description: Successful response
parameters:
- description: Composite group identifier
explode: false
in: path
name: groupIdentifier
required: true
allowReserved: true
schema:
properties:
domainCode:
description: Code of the master data domain
type: string
groupTypeCode:
description: The prototype type of the group that has to be searched
type: string
type: object
style: simple
running api gives me below error :
{ "fault": { "faultstring": "OASValidation MAM-SpecValidation with resource "oas://openapi.yaml": failed with reason: "[ERROR - Unable to parse JSON - Unrecognized token 'domainCode': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n\t at [Source: (String)"domainCode,CUSTOMER,groupTypeCode,CUSTOMER_GROUP"; line: 1, column: 11].: []]"", "detail": { "errorcode": "steps.oasvalidation.Failed" } } }
Also, I debugged the library and found that its trying to convert comma-seperated values in json and hence, giving this error.
The text was updated successfully, but these errors were encountered:
shikhashah45
changed the title
Style simple + Object with Path Variables is not working
[Bug] Style simple + Object with Path Variables is not working
May 2, 2024
Hi, I am using swagger request validator library (version 2.22.0) in my project with below yaml configurations.
running api gives me below error :
{ "fault": { "faultstring": "OASValidation MAM-SpecValidation with resource "oas://openapi.yaml": failed with reason: "[ERROR - Unable to parse JSON - Unrecognized token 'domainCode': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n\t at [Source: (String)"domainCode,CUSTOMER,groupTypeCode,CUSTOMER_GROUP"; line: 1, column: 11].: []]"", "detail": { "errorcode": "steps.oasvalidation.Failed" } } }
in the api call, I am passing path variables in object format (comma seperated) as mentioned in the doc - https://swagger.io/docs/specification/serialization/
ex. http://test.com/demo/domainCode,CUSTOMER,groupTypeCode,CUSTOMER_GROUP
Also, I debugged the library and found that its trying to convert comma-seperated values in json and hence, giving this error.
The text was updated successfully, but these errors were encountered: