Build paths and operations for OpenAPI
What does this MR do and why?
Implements OpenAPI 3.1 path and operation handling for internal GitLab Grape OpenAPI gem. This adds the core functionality to transform Grape API routes into OpenAPI 3.1 path items and operations with metadata extraction.
References
- Issue: #572540 (closed)
- Related: #572530 (Generator orchestrator)
- Follow-up: #572542 (Parameter handling)
- Follow-up: #572545 (Response handling)
How to set up and validate locally
- Set API classes to convert
api_classes = [API::Issues] # Alternatively, apply any filter logic: api_classes = API::Base.descendants.select { |k| !k.name.include?('::Internal::') }
- Run generator:
generator = Gitlab::GrapeOpenapi::Generator.new(api_classes) spec = generator.generate
- Verify paths:
spec[:paths].keys
- Verify operations:
spec[:paths].values
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.