Skip to content
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

Merge m4 to master branch #700

Merged
merged 65 commits into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
b63b6d3
Support for simple API with modelerfour(defined in xkcd.ymal)
dolauli Jul 8, 2020
c4d93b8
Move some libs from modeler-v3 to autorest.powershell and remove mode…
dolauli Jul 9, 2020
7e407b2
Reimplement CmdletClass based on modelerfour
dolauli Jul 13, 2020
f5fe11f
Merge pull request #619 from dolauli/modelerfour
dolauli Jul 13, 2020
4aa82ac
Add support for basic types like integer/number/array/boolean/.etc
dolauli Jul 15, 2020
588804c
Merge pull request #623 from dolauli/modelerfour
dolauli Jul 15, 2020
2b2bcd1
Add test cases for upgrade.
LucasYao93 Jul 15, 2020
304bd24
Merge pull request #624 from LucasYao93/lucas/modelerfour-test
dolauli Jul 15, 2020
b5a27ae
Init ADO pipeline for PR verification (#626)
dingmeng-xue Jul 16, 2020
40539fa
Add virtual properties and fix a few issues (#628)
dolauli Jul 17, 2020
d37d221
Support parameter path - llcsharp (#629)
shawncx Jul 21, 2020
f4fcba8
Add azure support for get with an empty response (#634)
dolauli Jul 21, 2020
6a7b1c9
Add validation script in pipeline (#630)
dingmeng-xue Jul 22, 2020
ff9c614
Add support for default response and fix an issue related to model (#…
dolauli Jul 22, 2020
edefc74
enable the test cases basic-get and basic-get-delete (#636)
dolauli Jul 23, 2020
6601894
Add another 9 test cases that has been supported (#638)
dolauli Jul 24, 2020
e400979
Change the script (#639)
Youri970410 Jul 24, 2020
266cb92
Update test-module-upgrade.yml
dolauli Jul 24, 2020
359123e
Update test-module-upgrade.yml, should use core instead of window pow…
dolauli Jul 24, 2020
1c9806f
Remove unpassed cases and upgrade codemodel dependency (#641)
dolauli Jul 27, 2020
373573f
support request body (#637)
shawncx Jul 28, 2020
b1f482c
Change the AutoRestUpgrade.ps1 for different Powershell version (#642)
Youri970410 Jul 28, 2020
67674b2
Support enum (#643)
shawncx Jul 29, 2020
a72ba58
Initial support for lro and paing (#644)
dolauli Jul 29, 2020
0af32f5
Fix the issue nested object is not supported (#646)
dolauli Aug 3, 2020
a377fe0
Add support for allof, datetime and enable two cases (#649)
dolauli Aug 3, 2020
42ca442
support header (#648)
shawncx Aug 4, 2020
7fef9bf
Add test cases of autorest extension. (#647)
LucasYao93 Aug 5, 2020
09f16fb
Intial support for polymorphism (#650)
dolauli Aug 5, 2020
9e3a7e0
Add support for duration and uuid (#652)
dolauli Aug 5, 2020
f23e48e
Add test cases to AllowList. (#653)
LucasYao93 Aug 5, 2020
656426c
support dict (#651)
shawncx Aug 5, 2020
666fb82
Add test cases of data model. (#654)
LucasYao93 Aug 5, 2020
ab8350c
Add databricks, fix several issues (#658)
dolauli Aug 10, 2020
7e49371
SupportDateTimeRfc1123 (#657)
shawncx Aug 10, 2020
797c5d9
Fix the BlackList issue (#656)
Youri970410 Aug 10, 2020
d18246f
Fixed a completer related issue and add support for credential (#660)
dolauli Aug 11, 2020
d8fcf0c
Enable 3 test cases (#659)
shawncx Aug 12, 2020
b861314
Fix some issues (#663)
shawncx Aug 13, 2020
7400f17
Update some test cases (#661)
Youri970410 Aug 13, 2020
7808ff9
Add two m4 configuration and fix some issues (#664)
dolauli Aug 14, 2020
f9c6089
Add support for enum with one value (#666)
dolauli Aug 18, 2020
27c06e7
fix some issues (#665)
shawncx Aug 18, 2020
ce1b3af
fix header issue (#667)
shawncx Aug 18, 2020
c02f5df
Fixed an enum related issue and add some RPs in the test (#669)
dolauli Aug 19, 2020
56731da
Fix some issues in m4 test (#671)
dolauli Aug 19, 2020
9403b4f
skip content type request parameter (#673)
shawncx Aug 20, 2020
d4ce300
Use the latest m4 (#674)
dolauli Aug 21, 2020
078f32b
Fix choice issue (#675)
shawncx Aug 24, 2020
2b337ef
Fix enum boolean response which has only one value (#676)
shawncx Aug 25, 2020
589b23a
Enable two test cases, and drop the workaround for x-ms-enum (#677)
dolauli Aug 26, 2020
1c7f54c
Upgrade modelerfour to 4.15.414 (#679)
dolauli Aug 26, 2020
01e526e
Add utils folder include a script to decrypt securestring (#682)
dolauli Aug 31, 2020
5bfd3a1
fix deserialize dictionary value bug (#684)
isra-fel Sep 1, 2020
7cb3568
Generate model for all the dictionaries and add support for unixtime…
dolauli Sep 1, 2020
aa99bef
git clone need not --recurse (#686)
isra-fel Sep 8, 2020
c923769
handle duplicated properties in parentes, fixes https://github.com/Az…
dolauli Sep 14, 2020
ee9a568
Add support for no-inline (#691)
dolauli Sep 18, 2020
ac262b1
Add support support for API, whose request body is just an object wit…
dolauli Oct 12, 2020
ce56adb
M4 master merge (#695)
dolauli Oct 13, 2020
b8406cd
Upgrade rush and pnpm (#697)
dolauli Oct 13, 2020
8205373
Clean m3 related steps from the pipeline (#699)
dolauli Oct 16, 2020
965e335
Merge m4 to master
dolauli Oct 16, 2020
c9b0f55
upgrade version to 3.0.0
dolauli Oct 16, 2020
aa63853
Remove some useless comments
dolauli Oct 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .azure-pipelines/test-module-upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
pool:
name: Hosted VS2017
demands: npm

steps:
- task: NodeTool@0
displayName: 'Use Node 10.16.0'
inputs:
versionSpec: 10.16.0

- task: Npm@1
displayName: 'Install autorest@beta'
inputs:
command: custom
verbose: false
customCommand: 'install -g "@autorest/autorest"'

- task: Npm@1
displayName: 'Install @microsoft/rush'
inputs:
command: custom
verbose: false
customCommand: 'install -g @microsoft/rush@5.12.0'

- task: CmdLine@2
displayName: 'Rush sync-versions'
inputs:
script: 'rush sync-versions'

- task: CmdLine@2
displayName: 'Rush Update'
inputs:
script: 'rush update'

- task: CmdLine@2
displayName: 'Rush Rebuild'
inputs:
script: 'rush rebuild'

- pwsh: |
./AutoRestUpgradeTest.ps1 -AllowList
workingDirectory: 'tests-upgrade'
displayName: 'Verify Upgrad'

- task: PublishPipelineArtifact@0
displayName: 'Save artifacts'
inputs:
artifactName: CompareResult
targetPath: tests-upgrade\CompareResult
condition: succeededOrFailed()
41 changes: 19 additions & 22 deletions common/config/rush/pnpm-lock.yaml

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

4 changes: 1 addition & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ Use of this project requires the following:

## Cloning this repository

Make sure that you clone this repository with `--recurse` - there is a submodule with common code that we pull from the `https://github.com/azure/perks` project.

``` powershell
# clone recursively
git clone https://github.com/azure/autorest.powershell --recurse
git clone https://github.com/azure/autorest.powershell

# one-time
cd autorest.powershell
Expand Down
105 changes: 59 additions & 46 deletions powershell/autorest-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@
- Please don't edit this section unless you're re-configuring how the powershell extension plugs in to AutoRest
AutoRest needs the below config to pick this up as a plug-in - see https://github.com/Azure/autorest/blob/master/docs/developer/architecture/AutoRest-extension.md

> modelerfour configuration
``` yaml
modelerfour:
emit-yaml-tags: false
lenient-model-deduplication: true
additional-checks: false
always-create-content-type-parameter: false
always-seal-x-ms-enums: true
```

> if the modeler is loaded already, use that one, otherwise grab it.

``` yaml !isLoaded('@autorest/remodeler')
``` yaml !isLoaded('@autorest/modelerfour')
use-extension:
"@autorest/remodeler" : "~2.1.0"
"@autorest/modelerfour": "4.15.414"

# will use highest 2.0.x
```
Expand Down Expand Up @@ -52,6 +62,7 @@ module-folder: $(current-folder)/generated
cmdlet-folder: $(module-folder)/cmdlets
model-cmdlet-folder: $(module-folder)/model-cmdlets
custom-cmdlet-folder: $(current-folder)/custom
utils-cmdlet-folder: $(current-folder)/utils
internal-cmdlet-folder: $(current-folder)/internal
test-folder: $(current-folder)/test
runtime-folder: $(module-folder)/runtime
Expand Down Expand Up @@ -93,62 +104,51 @@ declare-directive:
# Pipeline Configuration
``` yaml
pipeline:
# --- extension remodeler ---

# "Shake the tree", and normalize the model
remodeler:
input: openapi-document/multi-api/identity # the plugin where we get inputs from

# allow developer to do transformations on the code model.
remodeler/new-transform:
input: remodeler

# Make some interpretations about what some things in the model mean
tweakcodemodel:
input: remodeler/new-transform
# --- extension powershell based on modelerfour

# Specific things for Azure
tweakcodemodelazure:
input: tweakcodemodel
# Fix the code model gap between m3 and m4
tweakm4codemodel:
input: modelerfour/identity

# --- extension powershell ---
tweakcodemodel-v2:
input: tweakm4codemodel
# input: clicommon/identity

tweakcodemodelazure-v2:
input: tweakcodemodel-v2

# creates high-level commands
create-commands:
input: tweakcodemodelazure # brings the code-model-v3 with it.
create-commands-v2:
input: tweakcodemodelazure-v2

create-virtual-properties-v2:
input: create-commands-v2

create-virtual-properties:
input: create-commands

# Choose names for everything in c#
csnamer:
input: create-virtual-properties # and the generated c# files
csnamer-v2:
input: create-virtual-properties-v2

# ensures that names/descriptions are properly set for powershell
psnamer:
input: csnamer
psnamer-v2:
input: csnamer-v2

modifiers:
input: psnamer
modifiers-v2:
input: psnamer-v2

add-azure-completers:
input: modifiers
add-azure-completers-v2:
input: modifiers-v2

# creates powershell cmdlets for high-level commands. (leverages llc# code)
powershell:
input: add-azure-completers # and the generated c# files
llcsharp-v2:
input: modifiers-v2

powershell-v2:
input: add-azure-completers-v2

# --- extension llcsharp ---
# generates c# files for http-operations
llcsharp:
input: modifiers

llcsharp/text-transform:
input: llcsharp
input: llcsharp-v2
scope: scope-here

powershell/text-transform:
input: powershell
input: powershell-v2
scope: scope-here

llcsharp/emitter:
Expand All @@ -174,10 +174,10 @@ scope-here:

# Specific Settings for cm emitting - selects the file types and format that cmv2-emitter will spit out.
code-model-emitter-settings:
input-artifact: code-model-v3
input-artifact: code-model-v4
is-object: true
output-uri-expr: |
"code-model-v3"
"code-model-v4"

# testing: ask for the files we need
output-artifact:
Expand Down Expand Up @@ -409,4 +409,17 @@ verb-mapping:
Write: Write
```


``` yaml
cli:
reason: 'Keep same as modelerfour'
naming:
default:
parameter: 'camel'
property: 'camel'
operation: 'pascal'
operationGroup: 'pascal'
choice: 'pascal'
choiceValue: 'pascal'
constant: 'pascal'
type: 'pascal'
```
Loading