-
Notifications
You must be signed in to change notification settings - Fork 14
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
[FEATURE] specVersion 2.1: Add support for "customConfiguration" #308
Conversation
matz3
commented
Apr 16, 2020
•
edited
Loading
edited
- Add "customConfiguration" object for arbitrary configuration
- Also cover kind extension
- Add tests for all types / kinds (maybe generic?)
- Add generic tests to validate common configuration of 2.1 and 2.0 to avoid a lot of duplicated tests
@@ -0,0 +1,494 @@ | |||
const test = require("ava"); | |||
|
|||
test("commonUtils", async (t) => { |
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.
I think we should rather exclude this file in the ava config (see package.json).
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.
good point! done
} | ||
}); | ||
}); | ||
test("framework configuration: Invalid (specVersion " + version + ")", async (t) => { |
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.
I think all framework tests should be common across application, library and theme-library.
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.
done
All types of kind |
Looks ok from my side. Maybe @RandomByte also want to have a look |
"metadata": { | ||
"$ref": "../extension.json#/definitions/metadata" | ||
}, | ||
"task": { |
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.
Maybe make this a reference as well
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.
Done
"metadata": { | ||
"$ref": "../extension.json#/definitions/metadata" | ||
}, | ||
"middleware": { |
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.
Maybe make this a reference as well
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.
Done
test(`kind: extension / type: ${type} basic (${specVersion})`, async (t) => { | ||
await assertValidation(t, Object.assign({ | ||
"specVersion": specVersion, | ||
"kind": "extension", |
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.
Duplicate information. Already defined in additionalConfiguration
, so should be removed here
"kind": "extension", |
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.
Done
test(`kind: extension / type: ${type} additionalProperties (${specVersion})`, async (t) => { | ||
await assertValidation(t, Object.assign({ | ||
"specVersion": specVersion, | ||
"kind": "extension", |
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.
Duplicate information. Already defined in additionalConfiguration
, so should be removed here
"kind": "extension", |
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.
Done
}]); | ||
}); | ||
|
||
test(`${type} Invalid configuration: Additional property (${specVersion})`, async (t) => { |
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.
test(`${type} Invalid configuration: Additional property (${specVersion})`, async (t) => { | |
test(`kind: extension / type: ${type} Invalid configuration: Additional property (${specVersion})`, async (t) => { |
Align with other test names
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.
Done
Adds support for the "customConfiguration" configuration to provide custom data. Must be handled by custom tools. Can be consumed when using @ui5/project API.
We forgot to enhance this if with the new spec version: ui5-project/lib/projectPreprocessor.js Lines 279 to 280 in 71499c0
Also tests were not adapted. Currently you can't use specVersion 2.1 in a project, it will raise an error
|
#308 only allowed the use of the new spec version for extensions.
#308 only allowed the use of the new spec version for extensions.