Skip to content
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

MC-9710 Export Folders as JSON (no Models) #239

Merged
merged 17 commits into from
Mar 28, 2022
Merged

Conversation

adjl
Copy link
Contributor

@adjl adjl commented Feb 2, 2022

Allow Folders (sans Models) to be exported as JSON.

  • Implement the exportFolder controller action and corresponding endpoint
  • Write functional tests in mdm-core and mdm-testing-functional to verify export of simple and nested Folders as various roles
  • Write integration tests and expected-output files to verify export of Folders with facets and child Folders
  • Create FolderJsonExporterService, FolderExporterProviderService and generic ContainerExporterProviderService for abstraction/extension, e.g., for Classifiers

@adjl adjl marked this pull request as ready for review February 2, 2022 21:21
@adjl adjl marked this pull request as draft February 2, 2022 22:06
@adjl adjl marked this pull request as ready for review February 3, 2022 00:10
@adjl
Copy link
Contributor Author

adjl commented Feb 3, 2022

Should I also add an export test to FolderInterceptorSpec?

@adjl adjl force-pushed the feature/mc-9710 branch 3 times, most recently from 6a24ba6 to 139a6bf Compare February 3, 2022 15:21
Copy link
Contributor

@olliefreeman olliefreeman left a comment

Choose a reason for hiding this comment

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

Mostly good, just a few small changes needed, see the comments.

"providerType": "DataModelExporter",
"fileExtension": "xml",
"fileType": "text/xml",
"canExportMultipleDomains": true
},
{
"name": "FolderJsonExporterService",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't quite understand why this is expected to appear in mdm-plugin-datamodel and not mdm-core.

Copy link
Contributor

Choose a reason for hiding this comment

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

thats a good question, it should appear in both and in all plugins extending core

Copy link
Contributor

Choose a reason for hiding this comment

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

it does... see the comment later on

Copy link
Contributor

@olliefreeman olliefreeman left a comment

Choose a reason for hiding this comment

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

All issues fixed, just 2 new ones..

def is technically bad as we should type to a class, however its not evil and i actually prefer def over Object. we certainly shouldnt be replacing def with Object

"providerType": "DataModelExporter",
"fileExtension": "xml",
"fileType": "text/xml",
"canExportMultipleDomains": true
},
{
"name": "FolderJsonExporterService",
Copy link
Contributor

Choose a reason for hiding this comment

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

thats a good question, it should appear in both and in all plugins extending core

@adjl adjl force-pushed the feature/mc-9710 branch 2 times, most recently from 1f5cb8a to 7ac2c6c Compare March 7, 2022 10:06
@adjl adjl force-pushed the feature/mc-9710 branch 2 times, most recently from bf54887 to cbab755 Compare March 21, 2022 15:42
@olliefreeman
Copy link
Contributor

@adjl you need to run gradle licenseFormat to add the missing headers to the new files ... run it and commit it with the commit message add missing headers

@olliefreeman
Copy link
Contributor

you also need to add @Slf4j to MauroDataMapperServiceProviderFunctionalSpec which will reveal the failing 'test get exporters' message and the expected json.

ANY MauroDataMapperServiceProviderFunctionalSpec will need the folder exporter added to the list of expected json, and in mc-9714 the importer will need to be added

@olliefreeman olliefreeman merged commit fb566c9 into develop Mar 28, 2022
@olliefreeman olliefreeman deleted the feature/mc-9710 branch March 28, 2022 11:03
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.

None yet

2 participants