ruby-grape / ruby-grape/grape-swagger

Discussion: definitions name convention

Open
#519 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discuss! swagger-2.0
Dominant language
Ruby
Stars
1.1k
Forks
479
Avg merge
2d 14h
Merged PRs (30d)
6

Description

In light of the discussion in https://github.com/ruby-grape/grape-swagger/pull/515

My proposal is to introduce less magic/assumptions and be more clear about the naming of the definitions.

def model_name(entity)
  if entity.respond_to?(:entity_name)
    entity.entity_name
  else
    entity.name
  end
end

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the discussion in pull request 515 and the six comments on this issue. Review the proposed model_name behavior and determine whether the project agrees on a definitions naming convention; done would require an agreed scope before implementation can be identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.