Skip to content

feat(api): complete Stage 2 OpenAPI contract and generation source (CYN-55) - #39

Merged
SiddharthaGF merged 3 commits into
mainfrom
ailuracodedev/cyn-55-complete-stage-2-openapi-contract-and-generation-source
Aug 6, 2026
Merged

feat(api): complete Stage 2 OpenAPI contract and generation source (CYN-55)#39
SiddharthaGF merged 3 commits into
mainfrom
ailuracodedev/cyn-55-complete-stage-2-openapi-contract-and-generation-source

Conversation

@SiddharthaGF

Copy link
Copy Markdown
Owner

Summary

  • Commit the OpenAPI 3.0 contract at contracts/openapi.json as a minified, deterministic artifact produced fully in-process by the new tools/Cynara.OpenApiExport exporter, so client generators consume a reviewable, CI-checked document instead of an ad-hoc live endpoint
  • Register reusable JSON:API error (jsonApiErrorDocument), pagination (paginationMeta), and workspace request/response schemas; wire them into custom controllers and JADNC workflow actions so every documented error status resolves to the shared contract schema
  • Lock serialization conventions: [OpenApiEnumValues] + CynaraEnumSchemaFilter emit enum lists for enum-like DTO strings, and ReadOnlyIdSchemaFilter marks response ids readOnly
  • Add OpenApiSnapshotTests (drift byte-compare, determinism, OAS 3.0 structural validation) and a Stage 2 endpoint-inventory test; add OpenApiExport/OpenApiCheck Cake targets with OpenApiCheck wired into Check
  • Run OpenApiCheck in the Husky pre-commit group so a stale contract blocks commits, and split OpenApiFilters.cs into document/operation/schema filter files

Test plan

  • dotnet cake --target=Check (format-check + lint + openapi-check + 356 tests)
  • dotnet cake --target=OpenApiExport regenerates contracts/openapi.json
  • Confirm the drift test fails with the message run dotnet cake --target=OpenApiExport after touching an endpoint/schema without regenerating
  • Confirm cynara-web (CYN-56) can consume contracts/openapi.json for client generation

Linear:

Commit the OpenAPI 3.0 document generated fully in-process by the new
export tool, so client generators consume a reviewable, CI-checked
artifact instead of an ad-hoc live endpoint. The committed document is
minified to keep the repository diff surface small. Adds reusable
JSON:API error and pagination schemas, enum-value and readOnly
serialization conventions, and drift/determinism/OAS-validation plus
endpoint-inventory tests, backed by the OpenApiExport/OpenApiCheck
build targets.
Split OpenApiFilters.cs into document, operation, and schema filter files
so each filter kind lives with its own concerns. Run OpenApiCheck in the
Husky pre-commit group so a stale contracts/openapi.json blocks commits
the same way formatting and linting do, not just CI. Drop the dummy
connection password and keep the exporter on await-using via a scoped
MA0004 suppression, matching the repo's RCS1261 preference.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Neon branch ready.

…ty assignments

Added logic to the DemoShowcaseSeeder to retrieve and filter existing capability assignments before granting new capabilities. This prevents duplicate grants and ensures that only unheld capabilities are assigned to the actor.
@SiddharthaGF
SiddharthaGF temporarily deployed to ailuracodedev/cyn-55-complete-stage-2-openapi-contract-and-generation-source - cynara-api PR #39 August 6, 2026 15:11 — with Render Destroyed
@SiddharthaGF
SiddharthaGF merged commit c7109a5 into main Aug 6, 2026
9 of 12 checks passed
@SiddharthaGF
SiddharthaGF deleted the ailuracodedev/cyn-55-complete-stage-2-openapi-contract-and-generation-source branch August 6, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant