Is there a published API for validation?

Issue #85 closed
Tim Jones created an issue

I’ve been thinking about adding swagger-mock-validator as an option to pact-js - it would be a win to be able to confirm that your pact matches the spec before asking the provider team to verify the pact.

Looking at the code, it looks like we could import smv from 'swagger-mock-validator' and then use smv.validate, but since this isn’t mentioned in the documentation, I wasn’t sure if it is safe to use.

Is this function considered part of the exposed API and safe to use (at least until the major version changes)? If not, would you consider making it part of the exposed API?

Comments (4)

  1. Ben Sayers

    @Tim Jones yes this codebase does have a nodejs api, we never got around to adding it into our documentation.

    Everything inside this file is considered public API and we will use the semver to communicate the compatibility of any changes to this API:
    https://bitbucket.org/atlassian/swagger-mock-validator/src/master/lib/api-types.d.ts

    You can see examples of the API being used in some of our end to end tests:
    https://bitbucket.org/atlassian/swagger-mock-validator/src/master/test/e2e/api.spec.ts

  2. Log in to comment