Skip to content

Contract Testing Instruction fails with documented Base URL #182

Description

@johnjesudasondoss

While following the instructions in Specmatic Contract Testing Docs, I encountered an issue when running:
specmatic test employees.yaml --testBaseURL https://my-json-server.typicode.com

The command failed with the error:
Endpoints API and SwaggerUI URL were not exposed by the application, so cannot calculate actual coverage.

However, when I used the revised base URL:
specmatic test employees.yaml --testBaseURL https://my-json-server.typicode.com/specmatic/specmatic-documentation-examples
the operation succeeded.

A similar discrepancy occurs in strict mode.

This fails:
specmatic test --testBaseURL https://my-json-server.typicode.com --strict employees.yaml

This succeeds:
specmatic test --testBaseURL https://my-json-server.typicode.com/specmatic/specmatic-documentation-examples --strict employees.yaml

Additionally, the response object for POST /specmatic/specmatic/employees contains an unexpected attribute specmaticId, which is not defined in employees.yaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions