Skip to content

Commit 8d8df1e

Browse files
authored
Support services not specified in metadata.json (#3097)
The commit #3087 introduced passing a `serviceIdentifier` to the constructor which needs to be present in the `metadata.json`. For private models thats not the case and checking for `xmlNoDefaultLists` fails.
1 parent c10ef6e commit 8d8df1e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/model/api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function Api(api, options) {
3434
property(this, 'abbreviation', api.metadata.serviceAbbreviation);
3535
property(this, 'fullName', api.metadata.serviceFullName);
3636
property(this, 'serviceId', api.metadata.serviceId);
37-
if (serviceIdentifier) {
37+
if (serviceIdentifier && metadata[serviceIdentifier]) {
3838
property(this, 'xmlNoDefaultLists', metadata[serviceIdentifier].xmlNoDefaultLists, false);
3939
}
4040

test/model/api.spec.js

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)