Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Conversation

@NikolaVetnic
Copy link
Contributor

In this PR I have added Pages and ISBN attributes to Book entity. In addition I have resolved the issue with the Path does not exist.CDS (annotations) error in VS Code that sprung up once the Reviews were added.

@NikolaVetnic NikolaVetnic requested a review from fatschi August 13, 2025 10:56
@NikolaVetnic NikolaVetnic self-assigned this Aug 13, 2025
@NikolaVetnic NikolaVetnic added the enhancement New feature or request label Aug 13, 2025
}

// hint: this was needed to make the path not found at 'reviews/@UI.LineItem' go away
annotate AdminService.Reviews with @(UI: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

great thx

on reviews.book = $self;

pages : Integer @assert.range: [(0),_]; // hint: adds validation, must be > 0
isbn : String(20) @assert.format: '^(?=(?:\D*\d){10}(?:(?:\D*\d){3})?$)[\d-]+$'; // hint: https://stackoverflow.com/questions/41271613/use-regex-to-verify-an-isbn-number
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice, does this work when you try to edit an isbn in the books-admin? does it lead to errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you input an invalid ISBN value it prevents you from saving changes to the entity. I have not tested it more extensively as in what happens when wrong data is seeded and such.

@HunorTotBagi HunorTotBagi linked an issue Sep 4, 2025 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ISBN and page number attributes to Book entity

3 participants