Skip to content
This repository was archived by the owner on Aug 8, 2018. It is now read-only.
This repository was 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

@vdidenkodoit

Description

@vdidenkodoit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions