-
Notifications
You must be signed in to change notification settings - Fork 43
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: Multiple service support #2499
Conversation
🦋 Changeset detectedLatest commit: fd2d06e The changes in this PR will be included in the next version bump. This PR includes changesets to release 40 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
PR for initial consumption lgtm.
Focused on tools-suite consumption and manual testing:
- adding, deletion of services
- handling of multiple services
- fixed comments from earlier reviews
- changeset provided
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.
Mainly found some hard coded webapp
paths that should be replaced by getWebappPath from project-access
packages/mockserver-config-writer/src/mockserver-config/ui5-mock-yaml.ts
Outdated
Show resolved
Hide resolved
packages/mockserver-config-writer/src/mockserver-config/ui5-mock-yaml.ts
Outdated
Show resolved
Hide resolved
packages/mockserver-config-writer/src/mockserver-config/ui5-mock-yaml.ts
Outdated
Show resolved
Hide resolved
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.
review comments addressed -> re-approve 👍🏻
Already reviewed by Dominik and Johannes.
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.
Reapproving
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.
Added a few comments for improvement, otherwise, the coding adheres to expectations. However, my local tests fail. @broksy I will send you an internal project that gets misconfigured when adding a mockserver config.
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.
- changeset ok
- retesting successful
- feedback applied
|
Adds support for multiple services and multiple annotations per service. Includes updates for multiple packages.
odata-service-writer
remove(basePath, service, fs?)
to handle service related data removal from manifest.json and YAML filesgenerateMockserverConfig
: overwrite (if true, then mockserver services and annotations are overwritten based on manifest dataSources), else dataSources for services and annotations from manifest are collected and appended to the existing mockserver dataenhanceData
function updated with default service name and annotation name handling.mainService
will be used as the default name for first service,_Annotation
will be added to annotation name if annotation name matches service name to avoid generation of duplications in manifestdataSources
section.mockserver-config-writer
removeMockDataFolders(fs, basePath)
to remove all mock data paths during running ofremoveMockserverConfig
.ui5-config
addServiceToMockserverMiddleware(dataSourceConfig, appRoot?, annotationsConfig = [])
to add service to mockserver using information from manifest dataSourceremoveServiceFromMockServerMiddleware(servicePath, annotationsPaths)
to delete service from mockserver including annotations related to this service using information from manifest dataSourceaddBackendToFioriToolsProxydMiddleware(backend)
to handle multiple backends and avoid duplicatesremoveBackendFromFioriToolsProxydMiddleware(backendUrl)
to delete backend from fiori-tools-proxy usingcreate
fiori-freestyle-writer
'/'
(Unix like separator) tosep
(universal separator) frompath
module during template generation inprocessDestinationPath(filePath)
in order to make replace work also on Windows like paths.