-
Notifications
You must be signed in to change notification settings - Fork 49
Allow markdown docs to be inserted in the generated blueprint #8
Copy link
Copy link
Open
Description
So, we have this idea for the ideal workflow:
- Write your request specs
- Run your request specs and the whole apib file will be generated for you
There are two things missing to get to this state:
- copy markdown docs to the generated txt (or better .md)
- concat generated files to one apib file (will open another issue)
I can imagine the docs would either be in the source file (controller) or spec file. I'd probably go with the spec file as it will keep the information in one place, and also implementation will be easier.
The gem should copy the markdown docs from comments and place them in the generated file.
# Arena represents a combat room.
#
# Attributes:
#
# - `name` - arena name
# - `owner` - user who created the arena
describe 'Arenas Requests' do
# Fetch information about an arena.
describe 'GET /v1/arenas/{id}' do
it 'responds with the requested arena' do
arena = create :arena, foursquare_id: '5104'
get v1_arena_path(arena)
response.status.should eq(200)
end
end
endWould generate
# Group Arenas
Arena represents a combat room.
Attributes:
- `name` - arena name
- `owner` - user who created the arena
## GET /v1/arenas/{id}
Fetch information about an arena.
+ Response 200 (application/json)
{
"arena": {
"id": "4e9dbbc2-830b-41a9-b7db-9987735a0b2a",
"name": "Clinton St. Baking Co. & Restaurant",
"latitude": 40.721294,
"longitude": -73.983994,
"foursquare_id": "5104"
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels