Skip to content

Commit

Permalink
fix: don't include routes for endpoints that have schema disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Jan 13, 2021
1 parent 1e32a45 commit 6371059
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/rapid/schema/route_set_schema_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ class RouteSetSchemaType < Rapid::Object

no_schema

field :routes, [RouteSchemaType]
field :routes, [RouteSchemaType] do
backend do |o|
o.routes.select { |r| r.endpoint&.definition&.schema? }
end
end
field :groups, [RouteGroupSchemaType]

end
Expand Down

0 comments on commit 6371059

Please sign in to comment.