Skip to content

Conversation

@Mr-Leshiy
Copy link
Contributor

@Mr-Leshiy Mr-Leshiy commented Sep 9, 2025

Description

Its a refactoring from get ridding of macro code generation for the instantiation of the validation rules and moved such implementation as a plain Rust functions.

The main reason, that not all of the part is possible to instantiate during the compile time (e.g. JSON schema instance) and the only way how they could be instantiated its only the runtime, so it would become a mix of some things are evaluated during compile time, but some stuff evaluated during runtime still.
Which sounds we are overcomplicating things without no gain

Related Issue(s)

Part of https://github.com/input-output-hk/catalyst-internal-docs/issues/266
Closes #510

Description of Changes

  • Added a new catalyst-signed-doc-spec crate, which contain a definition of the signed_doc.json types.
  • Implemented ContentEncodingRule initialisation.
  • Moved all validation rules initialisation into the catalyst-signed-doc crate from the catalyst-signed-doc-macro
  • Cleaned up catalyst-signed-doc-macro crate.

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

@Mr-Leshiy Mr-Leshiy moved this from New to 🏗 In progress in Catalyst Sep 9, 2025
@Mr-Leshiy Mr-Leshiy added the squad: gatekeepers Catalyst App Backend, System Development & Integration Team label Sep 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2025

Test Report | ${\color{lightgreen}Pass: 448/448}$ | ${\color{red}Fail: 0/448}$ |

@Mr-Leshiy Mr-Leshiy moved this from 🏗 In progress to 👀 In review in Catalyst Sep 9, 2025
saibatizoku
saibatizoku previously approved these changes Sep 9, 2025
Copy link
Contributor

@saibatizoku saibatizoku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@saibatizoku saibatizoku force-pushed the feat/catalyst-signed-doc-spec branch from d874b5e to 3b5b47a Compare September 10, 2025 04:08
@saibatizoku saibatizoku requested a review from apskhem September 10, 2025 04:28
@Mr-Leshiy Mr-Leshiy changed the title feat(rust/signed-doc): Add a new separate crate catalyst-signed-doc-spec feat(rust/signed-doc): Catalyst Signed Documents validation initialisation fully during the runtime Sep 10, 2025
@Mr-Leshiy Mr-Leshiy merged commit 313b638 into main Sep 10, 2025
26 of 27 checks passed
@Mr-Leshiy Mr-Leshiy deleted the feat/catalyst-signed-doc-spec branch September 10, 2025 09:35
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Catalyst Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad: gatekeepers Catalyst App Backend, System Development & Integration Team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

ContentEncodingRule macro code generation

4 participants