danielgtaylor / danielgtaylor/aglio
incorrect processing of the enum datastructure
- Dominant language
- CoffeeScript
- Stars
- 4.7k
- Forks
- 471
- PR merge metrics
- No merged PRs in 30d
Description
Here is my sample API blueprint
_test-enum-datastructure.apib_
```
FORMAT: 1A
HOST: http://localhost:3000
# CustomerData API
test enum API
# Data Structures
## clients (enum)
+ Members
+ A
+ B
+ C
+ D
# Customers [/v1/test]
## Create customer [POST /v1/test]
+ Request (application/json)
+ Attributes (object)
+ uuid: wWinmNPfwuly (string)
+ client: A (clients)
+ Response 200 (application/json)
+ Attributes (boolean)
+ Sample: false
```
Which results to:

As you see in schema part, it doesn't understand that client is enum. However, I consider it's described in the correct format.
This particular format would change the situation:
```
## clients (enum)
+ A
+ B
+ C
+ D
```
But, it doesn't looks correct and some tools (I have tested with drakov https://github.com/Aconex/drakov) are failing with that format.
Any thoughts? I think the first one is correct.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the provided test-enum-datastructure.apib sample and inspect the generated schema shown in the report. Trace how the clients enum data structure and the client attribute are processed; done means the schema recognizes client as an enum while preserving the documented API Blueprint format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100