Skip to main content
Kyle Karthauser 님이 #MuleSoft Exchange에 질문했습니다

Here is the route definition:

 

/products/approvedStates:

  get:

    queryParameters:

      issueStateAbbreviation:

        type: USStateAbbreviation

        required: false

    responses:

      200:

        body:

          application/json:

            type: ApprovedStatesOutput

      400:

        body:

          application/json:

            example:

              "Invalid state abbreviation."

 

USStateAbbreviation:

type: string

enum:

- AL

- AK

 

Activating the mocking service and providing one of the enum values (via dropdown) for the endpoint returns the following:

{

"code": "REQUEST_VALIDATION_ERROR",

"message": "Error validating parameter: expected type: JSONObject, found: String"

}

답변 4개
  1. 2020년 5월 7일 오후 4:08

    Lalit--

     

    That works for me, too.

     

    We are trying to use libraries instead of defining all the types in the root file.

     

    That is what appears to be causing the issue.

     

    Do you have any comments on the use of libraries in the root file and the Mocking Service?

0/9000