Skip to content

strapi-plugin-documentation generates "foo" response  #10524

@badsyntax

Description

@badsyntax

Bug report

Describe the bug

I'm seeing the following response body definition for my single content type:

"responses": {
    "200": {
    "description": "Retrieve about-page document(s)",
    "content": {
        "application/json": {
          "schema": {
            "properties": {
              "foo": {
                 "type": "string"
              }
            }
          }
        }
    }
},

Steps to reproduce the behavior

  1. Create a single content type with spaces in the Display name. The generated UID should contain dashes - this is the important part that triggers the bug
  2. View the generate OpenAPI spec

Expected behavior

I would expect the generated openapi spec to be:

"responses": {
    "200": {
    "description": "Retrieve about-page document(s)",
    "content": {
        "application/json": {
        "schema": {
            "type": "array",
            "items": {
            "$ref": "#/components/schemas/AboutPage"
            }
        }
        }
    }
},

System

  • Node.js version: v14.15.5
  • NPM version:6.14.11
  • Strapi version: 3.6.3
  • Database:postgres
  • Operating system: macos

Metadata

Metadata

Assignees

Labels

status: pending reproductionWaiting for free time to reproduce the issue, or more information

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions