JSON API v1.0 support
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- api, documentation
Research direction
Start by tracing how Grape::Entity and Grape Swagger generate the request parameters and response model shown in Swagger UI. Compare that output with the JSON API v1.0 nested relationships example; done means Swagger UI represents nested attributes and relationships rather than only a flat attribute list.
Written by the indexing model from the issue text.
Description
Hi.
I'm planning to use JSON API v1.0 standard with Grape API + Grape Entities + Grape Swagger in my project, but unfortunately I couldn't manage to make it work.
I've stumbled upon an issue that I cannot create nested attributes. The result I'm trying to achieve should look like so:
{
"links": {
"self": "http://example.com/posts",
"next": "http://example.com/posts?page[offset]=2",
"last": "http://example.com/posts?page[offset]=10"
},
"data": {
"type": "posts",
"id": "1",
"attributes": {
"title": "JSON API paints my bikeshed!"
}
relationships: {
author: {
data: {
id: 1,
type: 'users'
}
}
}
}
}
Is it even possible with Grape::Entity + Grape Swagger?
Forgot to mention, Swagger UI just shows flat list of attributes in both request parameters section and response model.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby-grape/grape-swagger
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ruby-grape/grape-swagger#989 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
ruby-grape/grape-swagger#987 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ruby-grape/grape-swagger#952 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ruby-grape/grape-swagger#950 · 2 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
ruby-grape/grape-swagger#935 ·
All issues in ruby-grape/grape-swagger
Similar issues
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
TheOdinProject/curriculum#31402 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100