Skip to content

test: all .feature files need to provide schema context #481

@Kevsy

Description

@Kevsy

Problem description

PR #480 provides a reference for the XCorrelator definition :

And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"

"#/components/schemas/XCorrelator" is a relative URI, so we need some context to resolve it. @bigludo7 added this explanatory text following @jlurien's good comment in #470:

  # References to OAS spec schemas refer to schemas specified in <xxx>-subscriptions.yaml
  # References to schemas starting with the # symbol are JSON Pointers from the root of the OAS document: <xxx>-subscriptions.yaml, Schema names are aligned with the event-subscription-template.yaml artifact.
  

...which is fine, but: this is only stated in the event subscriptions template. It is not in API Guidelines, which only states:

Background:
    Given an environment at "apiRoot" 
    And the resource "{path_resource}"                                                              |
    And the header "Content-Type" is set to "application/json"
    And the header "Authorization" is set to a valid access token
    And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"

So the problem is that "#/components/schemas/XCorrelator" has no context here: the schema file to which it refers is not declared.

Expected behavior

As has been done for the even subscriptions feature template, declare the schema file used in all .feature files, either in API Guidelines documentation) or as an explicit declaration in each .feature file, e.g.:

And the schema definition is located at {API definition.yaml}

Alternative solution

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctioncorrection in documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions