Skip to content

generate does not exit with circular referencesΒ #260

@cugu

Description

@cugu

tfplugingen-openapi CLI version

v0.3.0

OpenAPI Spec File

{
  "openapi": "3.0.3",
  "info": {
    "title": "API",
    "version": "1.0.0"
  },
  "paths": {
    "/a": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": ""
          }
        }
      }
    },
    "/a/{id}": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/A"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "A": {
        "type": "object",
        "properties": {
          "a": {
            "$ref": "#/components/schemas/A"
          },
          "b": {
            "$ref": "#/components/schemas/B"
          }
        }
      },
      "B": {
        "type": "object",
        "properties": {
          "a": {
            "$ref": "#/components/schemas/A"
          },
          "b": {
            "$ref": "#/components/schemas/B"
          }
        }
      }
    }
  }
}

Generator Config

provider:
  name: foo
resources:
  a:
    create:
      path: /a
      method: POST
    read:
      path: /a/{id}
      method: GET
    delete:
      path: /a/{id}
      method: DELETE

Expected Behavior

Create the results or display an error message.

Actual Behavior

The tfplugin-openapi process did not exit, but ran continuously and printed error messages.

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions