OpenAPITools / OpenAPITools/openapi-diff

Support for detecting changes in webhooks

Open
#793 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OpenAP 3.1.0 Support
Dominant language
Java
Stars
1.1k
Forks
190
PR merge metrics
No merged PRs in 30d

Description

It would be nice to support API changes in webhooks defined with OpenAPI 3.1, in particular:

  1. Detect if a webhook is removed
  2. Detect changes in the webhook payload

Unfortunately it looks like now this is not possible.

This can be reproduced by doing:


    String oldSpec = Paths.get("webhook1.yml").toUri().toString();
    String newSpec = Paths.get("webhook2.yml").toUri().toString();

    ChangedOpenApi diff = OpenApiCompare.fromLocations(oldSpec, newSpec);

The content of boths specs are attached here (as .txt but they are .yml specs)

webhook1.txt

webhook2.txt

Note that no differences are found in this case

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the OpenApiCompare.fromLocations reproduction with the attached webhook1.txt and webhook2.txt specifications. Trace how OpenAPI 3.1 webhooks are compared, then verify that removing a webhook and changing its payload are reported as differences. Done means both cases produce differences for the provided specifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.