Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

Invalid model specified: Validation Result: warnings : [], errors : [Invalid model schema specified] #213

Open
vdidenkodoit opened this issue Jul 11, 2018 · 0 comments

Comments

@vdidenkodoit
Copy link

vdidenkodoit commented Jul 11, 2018

Hi there!
I found a problem in AWS API Gateway. I had tried to import json into AWS API Gateway and got the error from the title. I had spent a lot of hours to find a problem and found it finally.

Example of json:

"ScanHistoryDTO": {
      "type": "object",
      "properties": {
        "note": {
          "type": "string"
        },
        "requestDetails": {
          "type": "string"
        },
        "updatedBy": {
          "type": "string"
        },
        "updatedOn": {
          "type": "string",
          "example": "dd/MM/yyyy HH:mm"
        }
      },
      "title": "ScanHistoryDTO"
}

The problem was in "updatedOn/example" param. If "example" param exists then we have the Invalid model schema specified error. If this param is removed then import works fine.

Note: example param is added to json automatically, it takes value from the pattern parameter:
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd/MM/yyyy HH:mm") private Date updatedOn;

Do you have any suggestions how to fix it? Sorry if I duplicate an issue. I had tried to find a solution, but I couldn't.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant