Skip to content

feat(converter): extract HttpStatus enum response codes from constructor pattern#72

Open
abdul-levo wants to merge 3 commits into
AppThreat:mainfrom
abdul-levo:feat/emit-httpstatus-response-codes-v2
Open

feat(converter): extract HttpStatus enum response codes from constructor pattern#72
abdul-levo wants to merge 3 commits into
AppThreat:mainfrom
abdul-levo:feat/emit-httpstatus-response-codes-v2

Conversation

@abdul-levo
Copy link
Copy Markdown
Collaborator

This PR consumes those entries in the converter to emit all actual response
codes per endpoint instead of only the HTTP method default (200/201/204).

Example — /invite/validate now shows 200, 400, 401, 403 instead of just 200.

Changes:

  • Add HTTPSTATUS_ENUM_MAP to map HttpStatus enum constants to HTTP codes
  • Extend _infer_java_response_codes to read targetObj/definedBy (constructor pattern)
  • Extend STATUS_DESCRIPTIONS to cover 405, 409, 410, 422, 429, 501-503
  • All 83 existing tests pass

Note: Until AppThreat/atom#244 is merged, this change has no effect on
existing slice files

…esponse key

- Add _properties_from_getters() to build request body schema from
  argToCalls getter methods when the DTO is absent from userDefinedTypes
- Add _extract_response_dto_key() to derive the response object key from
  the actual response DTO class name instead of hard-coding 'description'
- Add _is_custom_dto() to distinguish application DTOs from stdlib types
- Add ±1 line tolerance in _infer_java_response_codes() to handle atom
  recording slices at the annotation line vs the method signature line
- Fix OpenAPI title format: '{name} OpenAPI Specification'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants