Currently, the speculator tool supports OpenAPI v3 specifications for detecting Shadow and Zombie APIs. We should extend support to also handle OpenAPI v2 (Swagger) specifications to make the tool more versatile and compatible with older APIs.
Why this is needed:
- Many organizations still use OpenAPI v2 for their API documentation.
- Supporting v2 will allow broader adoption of speculator and compatibility with legacy systems.
Proposed Solution:
- Detect OpenAPI spec version from the input file.
- If version is v2, parse it accordingly (using appropriate parser or conversion logic).
- Ensure the detection logic for Shadow/Zombie APIs works with v2 fields.
- Add automated tests for v2 specification parsing and matching.
Acceptance Criteria:
- speculator accepts OpenAPI v2 files as input without errors.
- Shadow/Zombie detection works the same way as v3.
- Test cases cover both v2 and v3 specs.
- Documentation updated to reflect v2 support.
Additional Notes:
Might need a conversion step to internally handle both versions in a unified format.
Currently, the speculator tool supports OpenAPI v3 specifications for detecting Shadow and Zombie APIs. We should extend support to also handle OpenAPI v2 (Swagger) specifications to make the tool more versatile and compatible with older APIs.
Why this is needed:
Proposed Solution:
Acceptance Criteria:
Additional Notes:
Might need a conversion step to internally handle both versions in a unified format.