Skip to content

Conversation

@peternhale
Copy link
Contributor

What does this PR do?

Adds a source behavior preset for ExternalServiceRegistration MD type. The new decomposition will save the contents of the ESR.schema xml entry into a yaml file as the same as the ESR.

Once enabled, the new transformer will be responsible to converting the MD to source and back to metadata format.

What issues does this PR fix or reference?

@W-17454236@

Functionality Before

The ESR MD type was presented in only xml format

Functionality After

The ESR MD type can now be presented in its MD format or, with these changes, be presented as a yaml file for editing along with the remaining xml elements in the sibling MD xml file

peternhale and others added 27 commits January 6, 2025 10:57
…w isAddressable (#1467)

* fix: add workflow flow actions and allow isAddressable

* fix: add workflow flow actions
* chore: register md apis to metadata registry

* Update metadataRegistry.json

chore:empty commit
…#1480)

* fix: resolve strict dirs before suffixes for potential metadata files

* fix: do not reuse suffixType if no match
* chore: reset snapshots to main

* fix: deploy ESR yaml and -meta

* test: fix registry test

* chore: bump core

* chore: always decompose to yaml

The schema property contents in an esr can be either yaml of json.
For simplicity, given the property alwasy represents an Open API spec, the decomposed format of schema will be yaml.
Recomposition will use an existing xml property, schemaUploadFileExtension, to determine the format when build the MD type.

* chore: add missing expected artifacts

---------

Co-authored-by: peternhale <[email protected]>
@peternhale peternhale requested a review from a team as a code owner January 24, 2025 18:46
const xmlContent = { ...(await component.parseXml<ESR>()).ExternalServiceRegistration };

// Extract schema content
// eslint-disable-next-line no-underscore-dangle
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks unused now.

type ESR = JsonMap & {
ExternalServiceRegistration: ExternalServiceRegistration &
{ schemaUploadFileExtension: SchemaType };
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Any way this can be a stronger type? JsonMap is pretty generic.

after(async () => {
await Promise.all([
// fs.promises.rm(path.join(testDir, 'force-app'), { recursive: true, force: true }),
// fs.promises.rm(path.join(testDir, MDAPI_OUT), { recursive: true, force: true }),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these need to be uncommented now or deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's how they were when I copied the test from another. I can uncomment them if that is "typical"

@peternhale peternhale merged commit dc7d20e into main Jan 24, 2025
51 checks passed
@peternhale peternhale deleted the phale/decompose-esr branch January 24, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants