Skip to content

Comments

adds schema conversion APIs#325

Merged
muditchaudhary merged 12 commits intocedar-policy:mainfrom
swabyra:schemaConversion4
Jul 18, 2025
Merged

adds schema conversion APIs#325
muditchaudhary merged 12 commits intocedar-policy:mainfrom
swabyra:schemaConversion4

Conversation

@swabyra
Copy link
Contributor

@swabyra swabyra commented Jul 17, 2025

This PR introduces new functionality for schema format conversion:

  1. Adds two new conversion methods:

    • .toCedarFormat(): Converts and returns Schema in Cedar format
    • .toJsonFormat(): Converts and returns Schema in JSON format
  2. Implements comprehensive test coverage:

    • FFI layer tests to verify native interactions
    • Java unit tests to ensure proper format conversions

Resolves #181 action item for schema conversion

…st/java

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
swabyra added 4 commits July 18, 2025 00:09
…st/java

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error, ficed the is authorized_json_partial import

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
swabyra added 7 commits July 18, 2025 10:49
…st/java and fixed the import error, ficed the is authorized_json_partial import

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error, ficed the is authorized_json_partial import

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error, ficed the is authorized_json_partial import

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error, ficed the is authorized_json_partial import

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error, ficed the is authorized_json_partial import

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error, fixed the is authorized_json_partial import

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
…st/java and fixed the import error, fixed the is authorized_json_partial import

Signed-off-by: Raheim Swaby <swabyra@amazon.com>
Copy link
Contributor

@muditchaudhary muditchaudhary left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mark-creamer-amazon mark-creamer-amazon left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@muditchaudhary muditchaudhary changed the title adds schema conversion method along with corresponding test cases ru… adds schema conversion APIs Jul 18, 2025
@muditchaudhary muditchaudhary merged commit 770e8cd into cedar-policy:main Jul 18, 2025
4 checks passed
muditchaudhary pushed a commit to muditchaudhary/cedar-java that referenced this pull request Jul 23, 2025
Signed-off-by: Raheim Swaby <swabyra@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-use Cedar JSON FFI where possible

3 participants