Skip to content

Commit

Permalink
Support services not specified in metadata.json (#3097)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
workeitel committed Feb 18, 2020
1 parent c10ef6e commit 8d8df1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Api(api, options) {
property(this, 'abbreviation', api.metadata.serviceAbbreviation);
property(this, 'fullName', api.metadata.serviceFullName);
property(this, 'serviceId', api.metadata.serviceId);
if (serviceIdentifier) {
if (serviceIdentifier && metadata[serviceIdentifier]) {
property(this, 'xmlNoDefaultLists', metadata[serviceIdentifier].xmlNoDefaultLists, false);
}

Expand Down
6 changes: 6 additions & 0 deletions test/model/api.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d8df1e

Please sign in to comment.