hashicorp / hashicorp/terraform-plugin-codegen-openapi
`generate` does not exit with circular references
- Dominant language
- Go
- Stars
- 91
- Forks
- 20
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 1
Description
### tfplugingen-openapi CLI version
v0.3.0
### OpenAPI Spec File
```YAML
{
"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
```YAML
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
- [x] I agree to follow this project's Code of Conduct
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.