drafter
drafter copied to clipboard
Wrong expanded refract for the circular enums
## GET /
+ Response 200 (application/json)
+ Attributes (array)
- (A)
- (B)
## Data Structures
## A (enum)
- (B)
- (array[B])
## B (enum)
- (A)
- (array[A])
The generated expanded refract looks wrong.
Drafter 5.0.0 produces the following output:
{
"element": "dataStructure",
"content": {
"element": "array",
"content": [
{
"element": "A"
},
{
"element": "B"
}
]
}
}
Where A is defined as:
{
"element": "dataStructure",
"content": {
"element": "enum",
"meta": {
"id": {
"element": "string",
"content": "A"
}
},
"attributes": {
"enumerations": {
"element": "array",
"content": [
{
"element": "B"
},
{
"element": "array",
"content": [
{
"element": "B"
}
]
}
]
}
}
}
}
B is defined as:
{
"element": "dataStructure",
"content": {
"element": "enum",
"meta": {
"id": {
"element": "string",
"content": "B"
}
},
"attributes": {
"enumerations": {
"element": "array",
"content": [
{
"element": "A"
},
{
"element": "array",
"content": [
{
"element": "A"
}
]
}
]
}
}
}
}
Which looks correct, expansion must not be working for circular nature of this API Blueprint.