Skip to content

Fix contract so it matches the backend Swagger#600

Open
chetanr25 wants to merge 1 commit into
fireform-core:developmentfrom
chetanr25:docs_swagger
Open

Fix contract so it matches the backend Swagger#600
chetanr25 wants to merge 1 commit into
fireform-core:developmentfrom
chetanr25:docs_swagger

Conversation

@chetanr25

Copy link
Copy Markdown
Collaborator

Fix contract so it matches the backend Swagger

Why

Once we could render contracts/ as Swagger, a few things did not match what the backend serves at /docs. The contract is meant to be the source of truth, so these gaps needed fixing.

Error logs

There was an error while processing your files. Please fix the error and save the file.


#/paths/~1api~1v1~1zipcode~1postal-code: JSON Pointer points to missing location: path/zipcode.yaml#/postal_code
#/paths/~1api~1v1~1zipcode~1location: JSON Pointer points to missing location: path/zipcode.yaml#/location

What was wrong

Broken zipcode paths. The root openapi.yaml pointed at path/zipcode.yaml#/postal_code and path/zipcode.yaml#/location. Neither exists. The zipcode file only ever defined one operation, and the real route is GET /api/v1/zipcode/lookup-address. Swagger threw two errors over the missing references and the actual endpoint was not shown at all.

Wrong grouping for weather and zipcode. The backend shows weather and zipcode as their own sections. The contract put both under one external-apis tag, so the rendered docs grouped them differently from the running API.

What changed

  • Replaced the two dead zipcode paths with the one that exists, lookup-address, pointing at the operation actually defined in the file.
  • Tagged the weather and zipcode operations with weather and zipcode to match the backend, and updated the tag list in openapi.yaml.

Result

The contract now resolves with no broken references and groups endpoints the same way the backend /docs does.

Related issue: #599

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant