After updating grape to 1.2.5 target_class options seems not working
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- ruby
- Área
- api, documentation
Línea de trabajo
Reproduce the minimal Rails example and follow the stack trace into grape-swagger.rb, especially combine_routes around lines 27 and 41 and add_swagger_documentation around line 129. Check how target_class is passed after the grape 1.2.5 update; done means the example mounts without the nil.unshift error and the Swagger routes remain available.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hello!
After we updated grape to 1.2.5 we can no longer mount grape (inside rails application),
here is minimal failing example:
# frozen_string_literal: true
module API
module V2
class Root < Grape::API
get :path do
end
end
class Documentation < Grape::API
add_swagger_documentation(
target_class: ::API::V2::Root,
)
end
end
end
and here is stack trace:
8: from /.../.rvm/gems/ruby-2.6.5/gems/grape-1.2.5/lib/grape/api.rb:40:in `block (2 levels) in override_all_methods!'
7: from /.../.rvm/gems/ruby-2.6.5/gems/grape-1.2.5/lib/grape/api.rb:144:in `add_setup'
6: from /.../.rvm/gems/ruby-2.6.5/gems/grape-1.2.5/lib/grape/api.rb:144:in `each'
5: from /.../.rvm/gems/ruby-2.6.5/gems/grape-1.2.5/lib/grape/api.rb:145:in `block in add_setup'
4: from /.../.rvm/gems/ruby-2.6.5/gems/grape-1.2.5/lib/grape/api.rb:153:in `replay_step_on'
3: from /.../.rvm/gems/ruby-2.6.5/gems/grape-swagger-0.33.0/lib/grape-swagger.rb:129:in `add_swagger_documentation'
2: from /.../.rvm/gems/ruby-2.6.5/gems/grape-swagger-0.33.0/lib/grape-swagger.rb:27:in `combine_routes'
1: from /.../.rvm/gems/ruby-2.6.5/gems/grape-swagger-0.33.0/lib/grape-swagger.rb:27:in `each'
/.../.rvm/gems/ruby-2.6.5/gems/grape-swagger-0.33.0/lib/grape-swagger.rb:41:in `block in combine_routes': undefined method `unshift' for nil:NilClass (NoMethodError)
- Lenguaje dominante
- Ruby
- Estrellas
- 1.1k
- Forks
- 477
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ruby-grape/grape-swagger
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ruby-grape/grape-swagger#1014 ·
Los mantenedores suelen responder en 1 día
-
Support default_response and default in 2.3; stop reading route.descPosiblemente ocupada @numbata la tomó hace 58 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ruby-grape/grape-swagger#989 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
ruby-grape/grape-swagger#987 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Bug report: omitted array parameters with `array_use_braces: true`Posiblemente ocupada @olivier-thatch la tomó hace 532 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
ruby-grape/grape-swagger#952 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Bug Report: `default` for array params (`type: [String]`) is incorrectly placed inside `items`Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
ruby-grape/grape-swagger#950 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de ruby-grape/grape-swagger
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
👩💻 équipe CE fonctionnalité
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
betagouv/conseillers-entreprises#4779 ·
Los mantenedores suelen responder en 1 día
-
Poetry updater rejects OR (||) Python constraints in PyprojectPreparer#update_python_requirementAbiertoL: python L: ruby:bundler
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
dependabot/dependabot-core#16819 ·
Los mantenedores suelen responder en 1 día
-
resource: surah-info
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
TarteelAI/quranic-universal-library#996 ·
Los mantenedores suelen responder en 1 día
-
Secrets filter leaves the tail of a secret when another secret is its prefixPosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100