-
Notifications
You must be signed in to change notification settings - Fork 5.6k
add datafactory track2 config and fix swagger #11563
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
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ These settings apply only when `--python` is specified on the command line. | |
| Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`. | ||
| Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. | ||
|
|
||
| ``` yaml $(python) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we still need this since we already have readme.python.md. |
||
| ``` yaml $(python) && !$(track2) | ||
| python-mode: create | ||
| python: | ||
| azure-arm: true | ||
|
|
@@ -15,13 +15,51 @@ python: | |
| package-version: 1.0.0 | ||
| clear-output-folder: true | ||
| ``` | ||
| ``` yaml $(python) && $(python-mode) == 'update' | ||
|
|
||
| ``` yaml $(python) && $(track2) | ||
| python-mode: create | ||
| azure-arm: true | ||
| license-header: MICROSOFT_MIT_NO_VERSION | ||
| namespace: azure.mgmt.datafactory | ||
| package-name: azure-mgmt-datafactory | ||
| package-version: 1.0.0b1 | ||
| clear-output-folder: true | ||
|
|
||
| directive: | ||
| - from: Trigger.json | ||
| where: $.definitions.BlobEventTypes.items | ||
| transform: > | ||
| return { | ||
| "type": "string", | ||
| "enum": [ | ||
| "Microsoft.Storage.BlobCreated", | ||
| "Microsoft.Storage.BlobDeleted" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "BlobEventTypesEnum", | ||
| "modelAsString": true | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ``` yaml $(python) && $(python-mode) == 'update' && !$(track2) | ||
| python: | ||
| no-namespace-folders: true | ||
| output-folder: $(python-sdks-folder)/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory | ||
| ``` | ||
| ``` yaml $(python) && $(python-mode) == 'create' | ||
|
|
||
| ``` yaml $(python) && $(python-mode) == 'update' && $(track2) | ||
| no-namespace-folders: true | ||
| output-folder: $(python-sdks-folder)/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory | ||
| ``` | ||
|
|
||
| ``` yaml $(python) && $(python-mode) == 'create' && !$(track2) | ||
| python: | ||
| basic-setup-py: true | ||
| output-folder: $(python-sdks-folder)/datafactory/azure-mgmt-datafactory | ||
| ``` | ||
|
|
||
| ``` yaml $(python) && $(python-mode) == 'create' && $(track2) | ||
| basic-setup-py: true | ||
| output-folder: $(python-sdks-folder)/datafactory/azure-mgmt-datafactory | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 don't think string is going to work for datafactory. This is meant to be oneOf scenario and swagger 2.0 hasn't supported oneOf yet.
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.
cc @lirenhe
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.
It has to be string as
"modelAsString": true"below.If it is not string, modelAsString should be false, and
formatneed to be 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.
Not that, In datafactory, this kind of property can be either enum string or Expression type. we need to use oneOf to express such scenario which is only supported in swagger 3.0, but currently we are using swagger 2.0 and I believe, we don't have plan to upgrade to swagger 3.0 at least in recent months.
Uh oh!
There was an error while loading. Please reload this page.
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 I get you. But even if this is supported by swagger, it will not be supported by SDK, at least not Java. We will not return anything like such: it could be enum, it could be string otherwise not included in the enum, or it could be an object of undefined schema, as there is no
Expressionanywhere in this def.Hence Java will not release for datafactory.