Skip to content

[BUG] ServerlessError: Error: There was an error converting the <schema> Model received looks like <some model> #144

@AshKemp23

Description

@AshKemp23

Describe the bug
ServerlessError: Error: There was an error converting the User0000CreateUserRequest schema. Model received looks like:
{ "schema": { "title": "CreateUserRequest", "description": "Request object to create user", "type": "object", "properties": { "field1": { "description": "This is the field 1", "type": "string" }, "category": { "description": "Category", "enum": [ "A", "B" ], "type": "string" }, "field3": { "description": "field 3", "type": "string" }, "amount": { "description": "amount", "type": "number" }, "field4": { "description": "Field 4", "type": "string" }, "field5": { "description": "Field 5", "type": "string" }, "field6": { "type": "string" }, "field7": { "description": "Field 7", "type": "string" }, "field8": { "description": "Field 8", "type": "string" }, "startDate": { "description": "Start Date", "type": "string" }, "endDate": { "description": "End Date", "type": "string" } }, "$schema": "http://json-schema.org/draft-07/schema#" }, "name": "User0000CreateUserRequest", "description": "Request object to create user", "contentType": "application/json" }

To Reproduce
Steps to reproduce the behavior:

Use serverless openapi generate command. The above error is thrown sometimes and the error message appears to be vague and does not specify what has failed and where.

Expected behavior
Document should be generated.

Desktop (please complete the following information):

  • Serverless version: [e.g. 3.34.0]
  • serverless-openapi-documenter version [e.g. 0.0.72]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions