Class RubyApiRouting
- java.lang.Object
-
- org.openapitools.codegen.languages.rubynextgen.RubyApiRouting
-
public final class RubyApiRouting extends Object
Pure routing logic for the ruby-nextgen generator: path -> (namespace, resource, action).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRubyApiRouting.RouteRoute triple: (namespace, resource, action).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcommonBasePrefix(Collection<String> paths)Longest leading run of identical literal segments shared by all paths.static List<String>literals(String path, String basePrefix)Literal segments after stripping the base prefix and dropping {param} segments.static Set<String>resourceSegments(Collection<String> paths)Segments that appear immediately before a {param} in at least one path.static RubyApiRouting.Routeroute(String path, String httpMethod, String operationId, Set<String> rset, String basePrefix)
-
-
-
Method Detail
-
resourceSegments
public static Set<String> resourceSegments(Collection<String> paths)
Segments that appear immediately before a {param} in at least one path.
-
commonBasePrefix
public static String commonBasePrefix(Collection<String> paths)
Longest leading run of identical literal segments shared by all paths.
-
literals
public static List<String> literals(String path, String basePrefix)
Literal segments after stripping the base prefix and dropping {param} segments.
-
-