Skip to content

refactor(event_handler): extract OpenAPI schema generation from Route class#8098

Open
leandrodamascena wants to merge 1 commit intodevelopfrom
refactor/8097-extract-openapi-schema-generator
Open

refactor(event_handler): extract OpenAPI schema generation from Route class#8098
leandrodamascena wants to merge 1 commit intodevelopfrom
refactor/8097-extract-openapi-schema-generator

Conversation

@leandrodamascena
Copy link
Copy Markdown
Contributor

Issue number: closes #8097

Summary

  • Extract OpenAPI schema generation from Route into openapi/schema_generator.py with standalone functions
  • Move _DEFAULT_CONTENT_TYPE and _DEFAULT_OPENAPI_RESPONSE_DESCRIPTION to openapi/constants.py
  • Route._get_openapi_path now delegates to generate_openapi_path()
  • No public API changes — all moved methods were internal (_ prefixed)

Changes

Please provide a summary of what's being changed

User experience

Please share what the user experience looks like before and after this change


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@powertools-for-aws-oss-automation powertools-for-aws-oss-automation bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 4, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 4, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

❌ Patch coverage is 97.28261% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.62%. Comparing base (7323c05) to head (b853c9f).

Files with missing lines Patch % Lines
...wertools/event_handler/openapi/schema_generator.py 97.17% 1 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8098      +/-   ##
===========================================
- Coverage    96.63%   96.62%   -0.01%     
===========================================
  Files          283      284       +1     
  Lines        13862    13881      +19     
  Branches      1111     1110       -1     
===========================================
+ Hits         13395    13413      +18     
- Misses         342      343       +1     
  Partials       125      125              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leandrodamascena leandrodamascena requested a review from hjgraca April 4, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event_handlers size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tech debt: Extract OpenAPI schema generation from Route

1 participant