Skip to content

Conversation

@Mr-Leshiy
Copy link
Contributor

Description

Fixing an incorrect Presentation Template JSON schema.

Related Issue(s)

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

Description of Changes

  • Renamed type name from css to cardTemplateCss
  • Renamed type name from template to cardTemplate

Related Pull Requests

Blocker for #533

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 self-assigned this Sep 9, 2025
@Mr-Leshiy Mr-Leshiy added review me PR is ready for review requires architect review Requires at least 1 architect to sign off on PR before merge. labels Sep 9, 2025
@Mr-Leshiy Mr-Leshiy moved this from New to 👀 In review in Catalyst Sep 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2025

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

Copy link
Collaborator

@stevenj stevenj left a comment

Choose a reason for hiding this comment

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

Why? I don't see anything that is incorrect. Whats incorrect in the original specifications?

@github-project-automation github-project-automation bot moved this from 👀 In review to 🔖 Ready in Catalyst Sep 9, 2025
@Mr-Leshiy
Copy link
Contributor Author

@stevenj the only actually change was done here https://github.com/input-output-hk/catalyst-libs/pull/546/files#diff-e80c9512b4c1512639aa6c58cc94f6c67a387587510878e288d9ababde4e1f2e.
An issue with the JSON schema definitions, css and template properties were referencing to the cardTemplateCss and cardTemplate types, but such types with such names were defined and were defined css and template types (I believe just because of the typo).

presentationTemplate: {
	$schema: "https://json-schema.org/draft/2020-12/schema"
	title:   "Presentation Template"
	description: """
		Presentation Templates define how data extracted from Form Data is to be presented.
		They provide a way to parameterize the contents of a UI in response to the changing
		needs of the Forms themselves.
		"""
	maintainers: [{
		name: "Catalyst Team"
		url:  "https://projectcatalyst.io/"
	}]
	type: "object"
	properties: {
                ...
		template: $ref:     "#/$defs/cardTemplate"
		css: $ref:          "#/$defs/cardTemplateCss"
	}
    ...
	$defs: {
	        ...
		template: {
			type:        "string"
			contentType: "text/html; charset=utf-8; template=handlebars"
			description: """
				HTML5 defined presentation layout for the card.
				The data is templated with handlebars, and the data that can be inserted is
				derived from the `requiredDocumentTypes` and available system wide dynamic data.
				"""
		}
		css: {
			type:        "string"
			contentType: "text/css; charset=utf-8; template=handlebars"
			description: """
				Optional styling that can be used by the HTML generated from the template for presentation.
				"""
		}
	}
}

@stevenj stevenj merged commit 6e806ce into main Sep 9, 2025
25 of 26 checks passed
@stevenj stevenj deleted the fix/presentation-template branch September 9, 2025 14:01
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in Catalyst Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires architect review Requires at least 1 architect to sign off on PR before merge. review me PR is ready for review

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants