Skip to content

docs(examples): add a description bundles example for the API-Only TranscriberJ - #89

Merged
Arc-E-Tect merged 1 commit into
mainfrom
feat/description-bundles-example
Sep 18, 2026
Merged

Arc-E-Tect merged 1 commit into
mainfrom
feat/description-bundles-example

Conversation

@Arc-E-Tect

Copy link
Copy Markdown
Owner

A small, complete project under examples/api-only-transcriberj/description-bundles that documents one contract in English and Dutch from one generated class tree, with descriptions from a ResourceBundle.

What is in it

  • An orders contract, built by the Publisher (0.5.0) in the example itself: OrderV1 with a nested customer.address and an array of lines, and ProblemV1, an error with an array of errors.
  • TranscriberJ 0.3.2 with generateDocs = true and descriptionBundle = 'docs.Descriptions', and the REST Docs emitter 0.1.1.
  • A deliberately partial English bundle and a partial Dutch bundle, so both fallbacks are visible.
  • DescriptionsTest, 7 tests:
    • the bundle wins where it has a key, and the contract describes the rest;
    • the same tree in Dutch, falling back to the English bundle and then to the contract;
    • an error schema, described the same way;
    • a class without a locale follows the language the build asks for (-PdocsLocale, English by default);
    • REST Docs renders each language;
    • missing() and untranslated() list what is not covered;
    • a key in any bundle that the contract no longer describes fails the build.
  • A README with "Try it" steps.
  • Its own workflow, example-api-only-transcriberj-description-bundles-build.yml, which runs ./gradlew test on every change to the example.

Verified

The tutorial that walks through this example is in the API repository, under docs/guides/description-bundles/.

Findings, not addressed here

  • No other Library example is built by CI. spring-rules-build.yml lists the path of single-module-spring but never builds it.
  • The REST Docs companions (<Class>Docs.fields()) have no Locale overload. Rendering several languages in one run means setting apionly.descriptions.locale between calls.

…anscriberJ

One orders contract, built by the Publisher, with a nested object, an
array and an error schema; a partial English and a partial Dutch
bundle; and tests that render both languages from one generated tree,
follow the language a run asks for, list what is not covered, and fail
on keys the contract no longer describes. A workflow of its own builds
it on every change to it.
@Arc-E-Tect
Arc-E-Tect merged commit c3237b0 into main Sep 18, 2026
1 check passed
@Arc-E-Tect
Arc-E-Tect deleted the feat/description-bundles-example branch September 18, 2026 10:49
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant