Skip to content

Add Support for OpenAPI Specification v2 (Swagger) #2

Description

@avithe-great

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:

  1. Detect OpenAPI spec version from the input file.
  2. If version is v2, parse it accordingly (using appropriate parser or conversion logic).
  3. Ensure the detection logic for Shadow/Zombie APIs works with v2 fields.
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions