-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add decomposition preset for external service registration #1493
Conversation
…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
…into phale/decompose-esr
* 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 <peter.hale@salesforce.com>
const xmlContent = { ...(await component.parseXml<ESR>()).ExternalServiceRegistration }; | ||
|
||
// Extract schema content | ||
// eslint-disable-next-line no-underscore-dangle |
There was a problem hiding this comment.
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 }; | ||
}; |
There was a problem hiding this comment.
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 }), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"
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