Update m4 to use new @autorest/codemodel renamed package (#3808)

This commit is contained in:
Timothee Guerin 2021-01-26 15:06:07 -08:00 коммит произвёл GitHub
Родитель e4e789b7d8
Коммит 29f916b9ab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
31 изменённых файлов: 486 добавлений и 151 удалений

Просмотреть файл

@ -58,24 +58,31 @@ specs:
- validation.json
- xml-service.json
- xms-error-responses.json
languages:
- language: python
outputPath: ../packages/extensions/core/test/regression/python
oldArgs:
- --version:~3.0.6320
- --use:@autorest/python
- --use:@autorest/modelerfour@4.15.451
- --use:@autorest/python@5.5.0
newArgs:
- --version:../packages/extensions/core
- --use:../packages/extensions/modelerfour
- --use:@autorest/python@5.5.0
- language: typescript
outputPath: ../packages/extensions/core/test/regression/typescript
oldArgs:
- --v3
- --use:@autorest/modelerfour@4.15.451
- --package-name:test-package
- --title:TestClient
- --use:@autorest/typescript@6.0.0-dev.20200715.2
- --use:@autorest/typescript@6.0.0-dev.20201208.1
newArgs:
- --v3
- --version:../packages/extensions/core
- --use:../packages/extensions/modelerfour
- --package-name:test-package
- --title:TestClient
- --use:@autorest/typescript@6.0.0-dev.20200715.2
- --use:@autorest/typescript@6.0.0-dev.20201208.1

Просмотреть файл

@ -3,7 +3,6 @@ dependencies:
'@azure-tools/autorest-extension-base': 3.1.267
'@azure-tools/codegen': 2.5.290
'@azure-tools/codegen-csharp': 3.0.263
'@azure-tools/codemodel': 4.13.349
'@azure-tools/datastore': 4.1.270
'@azure-tools/deduplication': 3.0.267
'@azure-tools/extension': 3.0.263
@ -26,7 +25,6 @@ dependencies:
'@types/express': 4.17.11
'@types/glob': 7.1.3
'@types/jest': 26.0.20
'@types/js-yaml': 4.0.0
'@types/jsonpath': 0.2.0
'@types/mocha': 5.2.5
'@types/morgan': 1.9.2
@ -944,6 +942,10 @@ packages:
dev: false
resolution:
integrity: sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA==
/@types/js-yaml/3.12.1:
dev: false
resolution:
integrity: sha512-SGGAhXLHDx+PK4YLNcNGa6goPf9XRWQNAUUbffkwVGGXIxmDKWyGGL4inzq2sPmExu431Ekb9aEMn9BkPqEYFA==
/@types/js-yaml/4.0.0:
dev: false
resolution:
@ -8648,7 +8650,7 @@ packages:
'@azure-tools/autorest-extension-base': 3.1.267
'@azure-tools/codegen': 2.5.290
'@azure-tools/linq': 3.1.262
'@types/js-yaml': 4.0.0
'@types/js-yaml': 3.12.1
'@types/mocha': 5.2.5
'@types/node': 14.14.22
'@typescript-eslint/eslint-plugin': 4.14.1_b15473b68481c2b07ec15e4066acfd77
@ -8656,7 +8658,7 @@ packages:
eslint: 7.18.0
eslint-plugin-prettier: 3.2.0_eslint@7.18.0+prettier@2.2.1
glob: 7.1.6
js-yaml: 4.0.0
js-yaml: 3.13.1
mocha: 5.2.0
mocha-typescript: 1.1.17
ts-morph: 4.0.1
@ -8668,7 +8670,7 @@ packages:
peerDependencies:
prettier: '*'
resolution:
integrity: sha512-CZ5q/gmaUBsMTRCl0rN/9WBIHdIkjW6V1c2y951UsZBA/ykZaaxpyyagOpioxFH6lSXo24ghtzyiLNumOTXkqA==
integrity: sha512-Xzo1S6Y0ebLdiMdWwtUU6H9myuad5lEwHf9t4vjvyz5K8QnQz5h/TbU/ltpW6VCxyvTuugYjN+ot757tPG1KHA==
tarball: 'file:projects/codemodel.tgz'
version: 0.0.0
'file:projects/core.tgz':
@ -8775,7 +8777,7 @@ packages:
'@azure-tools/uri': 3.0.255
'@microsoft.azure/autorest.testserver': 2.10.68
'@types/jest': 26.0.20
'@types/js-yaml': 4.0.0
'@types/js-yaml': 3.12.1
'@types/node': 14.14.22
'@typescript-eslint/eslint-plugin': 4.14.1_b15473b68481c2b07ec15e4066acfd77
'@typescript-eslint/parser': 4.14.1_eslint@7.18.0+typescript@3.9.7
@ -8795,7 +8797,7 @@ packages:
dev: false
name: '@rush-temp/modelerfour'
resolution:
integrity: sha512-6TOtE71DdPqsJVnAIPm8ZfNmV2n5jJ7KSG/gcBoEP2bUqlvLH0qLcsJBkNglJ+HPS0z3MurJqepI0TiQZ2pU/A==
integrity: sha512-/KQE1dUk+LWYiz0ttmdL+YaUzcjDR5zkoJ1toFMUfyfFlHNSF67RiT0GUh5yldr6RztwTT1UMyTYjVqlfqsYtg==
tarball: 'file:projects/modelerfour.tgz'
version: 0.0.0
'file:projects/schemas.tgz':
@ -8811,7 +8813,6 @@ specifiers:
'@azure-tools/autorest-extension-base': ~3.1.0
'@azure-tools/codegen': 2.5.290
'@azure-tools/codegen-csharp': ~3.0.0
'@azure-tools/codemodel': ~4.13.0
'@azure-tools/datastore': ~4.1.0
'@azure-tools/deduplication': ~3.0.266
'@azure-tools/extension': ~3.0.0
@ -8834,7 +8835,6 @@ specifiers:
'@types/express': ~4.17.9
'@types/glob': ^7.1.3
'@types/jest': ^26.0.20
'@types/js-yaml': ~4.0.0
'@types/jsonpath': ^0.2.0
'@types/mocha': 5.2.5
'@types/morgan': ^1.9.2

Просмотреть файл

@ -9,6 +9,6 @@ This means that if the pull request include some changes to any packages you wil
## Release
If you want to release an update you will then have to run `rush publish`. This will take all pending change files created with `rush change`, update the changelog and bump the package(s) version.
If you want to release an update you will then have to run `rush publish -a`. This will take all pending change files created with `rush change`, update the changelog and bump the package(s) version.
Then in the Pull Request make sure to add the `Publish` label to tell the validation that this is meant to publish and it will ignore the change check above.

Просмотреть файл

@ -0,0 +1,267 @@
{
"name": "@autorest/modelerfour",
"entries": [
{
"version": "4.15.455",
"tag": "@autorest/modelerfour_v4.15.455",
"date": "Tue, 26 Jan 2021 21:36:02 GMT",
"comments": {
"patch": [
{
"comment": "Update modelerfour to use renamed package @azuretools/codemodel -> @autorest/codemodel."
}
],
"dependency": [
{
"comment": "Updating dependency \"@autorest/codemodel\" from `~4.14.1` to `~4.14.3`"
}
]
}
},
{
"version": "4.15.x",
"comments": {
"patch": [
{
"comment": "**Fix** Missing description in responses. ([PR 370](https://github.com/Azure/autorest.modelerfour/pull/370))"
},
{
"comment": "**Feature** Added new flag `always-create-accept-parameter` to enable/disable accept param auto generation. ([PR 366](https://github.com/Azure/autorest.modelerfour/pull/366))"
},
{
"comment": "**Fix** Allow request with body being a file and `application/json` content-type. ([PR 363](https://github.com/Azure/autorest.modelerfour/pull/363))"
},
{
"comment": "**Fix** Dictionaries of dictionaries not being modeled as such(`dict[str, object]` instead of `dict[str, dict[str, str]]`). ([PR 372](https://github.com/Azure/autorest.modelerfour/pull/372))"
},
{
"comment": "**Fix** Issue with sibling models(Model just being a ref of another) causing circular dependency exception. ([PR 375](https://github.com/Azure/autorest.modelerfour/pull/375))"
},
{
"comment": "**Fix** Issue with duplicates schemas names due to consequtive name duplicate removal. ([PR 374](https://github.com/Azure/autorest.modelerfour/pull/374))"
},
{
"comment": "Schemas with `x-ms-enum`'s `modelAsString` set to `true` will now be represented as `ChoiceSchema` even with a single value."
},
{
"comment": "`Accept` headers are now automatically added to operations having responses with content types"
},
{
"comment": "Added `always-seal-x-ms-enum` settings to always create `SealedChoiceSchema` when an `x-ms-enum` is encountered"
}
]
}
},
{
"version": "4.14.x",
"comments": {
"patch": [
{
"comment": "added `exception` SchemaContext for `usage` when used as an exception response"
},
{
"comment": "changed `output` SchemaContext for `usage` to no longer include exception response uses"
}
]
}
},
{
"version": "4.13.x",
"comments": {
"patch": [
{
"comment": "add security info (checks to see if `input.components?.securitySchemes` has any content)"
},
{
"comment": "sync version of m4 and perks/codemodel == 4.13.x"
},
{
"comment": "adding quality prechecker step as a way to test the OAI document for quality before modelerfour runs."
},
{
"comment": "report duplicate parents via allOf as an error."
},
{
"comment": "added `modelerfour.lenient-model-deduplication` to cause schemas with duplicated names to be renamed with an `AutoGenerated` suffix. Note that this is a *temporary* measuer that should only be used when Swaggers cannot be updated easily. This option will be removed in a future version of Modeler Four."
}
]
}
},
{
"version": "4.12.x",
"comments": {
"patch": [
{
"comment": "updated CI to build packages"
},
{
"comment": "any is in a category in schemas"
},
{
"comment": "times is a new category in schemas (not populated yet, next build)"
},
{
"comment": "polymorphic payloads are not flattened (when it's the class that declares the discriminator)"
},
{
"comment": "readonly is pulled from the schema if it's there"
},
{
"comment": "body parameters should have the required flag set correctly"
},
{
"comment": "content-type is now a header parameter (wasn't set before)"
},
{
"comment": "added `modelerfour.always-create-content-type-parameter` to always get the content type parameter even when there are only one option."
},
{
"comment": "add support for x-ms-api-version extension to force enabling/disabling parameter to be treated as an api-version parameter"
},
{
"comment": "the checker plugin will now halt on errors (can be disabled by `modelerfour.additional-checks: false`)"
},
{
"comment": "when an enum without type is presented, if the values are all strings, assume 'string'"
},
{
"comment": "flatten parents first for consistency"
},
{
"comment": "added choiceType for content-type schema"
}
]
}
},
{
"version": "4.6.x",
"comments": {
"patch": [
{
"comment": "add additional checks for empty names, collisions"
},
{
"comment": "fix errant processing on APString => Apstring "
},
{
"comment": "x-ms-client-name fixes on parameters"
},
{
"comment": "added setting for `preserve-uppercase-max-length` to preserve uppercase words up to a certain length."
}
]
}
},
{
"version": "4.5.x",
"comments": {
"patch": [
{
"comment": "static linking libraries for stability"
},
{
"comment": "processed all names in namer, styles can be set in config (see below):"
},
{
"comment": "support overrides in namer "
},
{
"comment": "static linked dependency"
}
]
}
},
{
"version": "4.4.x",
"comments": {
"patch": [
{
"comment": "parameter grouping "
},
{
"comment": "some namer changes "
}
]
}
},
{
"version": "4.3.x",
"comments": {
"patch": [
{
"comment": "flattening (model and payload) enabled."
},
{
"comment": "properties should respect x-ms-client-name (many fixes)"
},
{
"comment": "global parameters should try to be in order of original spec"
},
{
"comment": "filter out 'x-ms-original' from extensions"
},
{
"comment": "add serializedName for host parameters"
},
{
"comment": "make sure reused global parameter is added to method too"
},
{
"comment": "processed values in constants/enums a bit better, support AnySchema for no type/format "
},
{
"comment": "support server variable parameters as method unless they have x-ms-parameter-location"
}
]
}
},
{
"version": "4.2.75",
"comments": {
"patch": [
{
"comment": "add `style` to parameters to support collection format "
},
{
"comment": "`potential-breaking-change` Include common paramters from oai/path #68 (requires fix from autorest-core 3.0.6160+ ) "
},
{
"comment": "propogate extensions from server parameters (ie, x-ms-skip-url-encoding) #61"
},
{
"comment": "`potential-breaking-change` make operation groups case insensitive. #59 "
},
{
"comment": "`potential-breaking-change` sealedChoice/Choice selection was backwards ( was creating a sealedchoice schema for modelAsString:true and vice versa) #62 "
},
{
"comment": "`potential-breaking-change` drop constant schema from response, use constantschema's valueType instead. #63"
},
{
"comment": "`potential-breaking-change` fix body parameter marked as required when not marked so in spec. #64"
}
]
}
},
{
"version": "4.1.60",
"comments": {
"patch": [
{
"comment": "query parameters should have a serializedName so that they don't rely on the cosmetic name property."
}
]
}
},
{
"version": "4.1.58",
"comments": {
"patch": [
{
"comment": "version bump, change your configuration to specify version `~4.1.0` or greater\n \n ``` \n use-extension:\n \"@autorest/modelerfour\" : \"~4.1.0\" \n ```\n - each Http operation (via `.protocol.http`) will now have a separate `path` and `uri` properties. \n <br>Both are still templates, and will have parameters. \n <br>The parameters for the `uri` property will have `in` set to `ParameterLocation.Uri`\n <br>The parameters for the `path` property will continue to have `in` set to `ParameterLocation.Path`\n\n \n - autorest-core recently added an option to aggressively deduplicate inline models (ie, ones without a name)\n and modeler-four based generator will have that enabled by default. (ie `deduplicate-inline-models: true`)\n <br>This may increase deduplication time on extremely large openapi models.\n\n - this package contains the initial code for the flattener plugin, however it is not yet enabled.\n\n - updated `@azure-tools/codemodel` package to `3.0.241`:\n <br>`uri` (required) was added to `HttpRequest`\n <br>`flattenedNames` (optional) was added to `Property` (in anticipation of supporting flattening)"
}
]
}
}
]
}

Просмотреть файл

@ -0,0 +1,142 @@
# Change Log - @autorest/modelerfour
This log was last generated on Tue, 26 Jan 2021 22:07:03 GMT and should not be manually modified.
## 4.15.455
Tue, 26 Jan 2021 21:36:02 GMT
### Patches
- Update modelerfour to use renamed package @azuretools/codemodel -> @autorest/codemodel.
## 4.15.x
### Patches
- **Fix** Missing description in responses. ([PR 370](https://github.com/Azure/autorest.modelerfour/pull/370))
- **Feature** Added new flag `always-create-accept-parameter` to enable/disable accept param auto generation. ([PR 366](https://github.com/Azure/autorest.modelerfour/pull/366))
- **Fix** Allow request with body being a file and `application/json` content-type. ([PR 363](https://github.com/Azure/autorest.modelerfour/pull/363))
- **Fix** Dictionaries of dictionaries not being modeled as such(`dict[str, object]` instead of `dict[str, dict[str, str]]`). ([PR 372](https://github.com/Azure/autorest.modelerfour/pull/372))
- **Fix** Issue with sibling models(Model just being a ref of another) causing circular dependency exception. ([PR 375](https://github.com/Azure/autorest.modelerfour/pull/375))
- **Fix** Issue with duplicates schemas names due to consequtive name duplicate removal. ([PR 374](https://github.com/Azure/autorest.modelerfour/pull/374))
- Schemas with `x-ms-enum`'s `modelAsString` set to `true` will now be represented as `ChoiceSchema` even with a single value.
- `Accept` headers are now automatically added to operations having responses with content types
- Added `always-seal-x-ms-enum` settings to always create `SealedChoiceSchema` when an `x-ms-enum` is encountered
## 4.14.x
### Patches
- added `exception` SchemaContext for `usage` when used as an exception response
- changed `output` SchemaContext for `usage` to no longer include exception response uses
## 4.13.x
### Patches
- add security info (checks to see if `input.components?.securitySchemes` has any content)
- sync version of m4 and perks/codemodel == 4.13.x
- adding quality prechecker step as a way to test the OAI document for quality before modelerfour runs.
- report duplicate parents via allOf as an error.
- added `modelerfour.lenient-model-deduplication` to cause schemas with duplicated names to be renamed with an `AutoGenerated` suffix. Note that this is a *temporary* measuer that should only be used when Swaggers cannot be updated easily. This option will be removed in a future version of Modeler Four.
## 4.12.x
### Patches
- updated CI to build packages
- any is in a category in schemas
- times is a new category in schemas (not populated yet, next build)
- polymorphic payloads are not flattened (when it's the class that declares the discriminator)
- readonly is pulled from the schema if it's there
- body parameters should have the required flag set correctly
- content-type is now a header parameter (wasn't set before)
- added `modelerfour.always-create-content-type-parameter` to always get the content type parameter even when there are only one option.
- add support for x-ms-api-version extension to force enabling/disabling parameter to be treated as an api-version parameter
- the checker plugin will now halt on errors (can be disabled by `modelerfour.additional-checks: false`)
- when an enum without type is presented, if the values are all strings, assume 'string'
- flatten parents first for consistency
- added choiceType for content-type schema
## 4.6.x
### Patches
- add additional checks for empty names, collisions
- fix errant processing on APString => Apstring
- x-ms-client-name fixes on parameters
- added setting for `preserve-uppercase-max-length` to preserve uppercase words up to a certain length.
## 4.5.x
### Patches
- static linking libraries for stability
- processed all names in namer, styles can be set in config (see below):
- support overrides in namer
- static linked dependency
## 4.4.x
### Patches
- parameter grouping
- some namer changes
## 4.3.x
### Patches
- flattening (model and payload) enabled.
- properties should respect x-ms-client-name (many fixes)
- global parameters should try to be in order of original spec
- filter out 'x-ms-original' from extensions
- add serializedName for host parameters
- make sure reused global parameter is added to method too
- processed values in constants/enums a bit better, support AnySchema for no type/format
- support server variable parameters as method unless they have x-ms-parameter-location
## 4.2.75
### Patches
- add `style` to parameters to support collection format
- `potential-breaking-change` Include common paramters from oai/path #68 (requires fix from autorest-core 3.0.6160+ )
- propogate extensions from server parameters (ie, x-ms-skip-url-encoding) #61
- `potential-breaking-change` make operation groups case insensitive. #59
- `potential-breaking-change` sealedChoice/Choice selection was backwards ( was creating a sealedchoice schema for modelAsString:true and vice versa) #62
- `potential-breaking-change` drop constant schema from response, use constantschema's valueType instead. #63
- `potential-breaking-change` fix body parameter marked as required when not marked so in spec. #64
## 4.1.60
### Patches
- query parameters should have a serializedName so that they don't rely on the cosmetic name property.
## 4.1.58
### Patches
- version bump, change your configuration to specify version `~4.1.0` or greater
```
use-extension:
"@autorest/modelerfour" : "~4.1.0"
```
- each Http operation (via `.protocol.http`) will now have a separate `path` and `uri` properties.
<br>Both are still templates, and will have parameters.
<br>The parameters for the `uri` property will have `in` set to `ParameterLocation.Uri`
<br>The parameters for the `path` property will continue to have `in` set to `ParameterLocation.Path`
- autorest-core recently added an option to aggressively deduplicate inline models (ie, ones without a name)
and modeler-four based generator will have that enabled by default. (ie `deduplicate-inline-models: true`)
<br>This may increase deduplication time on extremely large openapi models.
- this package contains the initial code for the flattener plugin, however it is not yet enabled.
- updated `@azure-tools/codemodel` package to `3.0.241`:
<br>`uri` (required) was added to `HttpRequest`
<br>`flattenedNames` (optional) was added to `Property` (in anticipation of supporting flattening)

Просмотреть файл

@ -1,103 +0,0 @@
# Changelog for ModelerFour
#### 4.16.0 _(unreleased)_
- **Fix** Missing description in responses. ([PR 370](https://github.com/Azure/autorest.modelerfour/pull/370))
- **Feature** Added new flag `always-create-accept-parameter` to enable/disable accept param auto generation. ([PR 366](https://github.com/Azure/autorest.modelerfour/pull/366))
- **Fix** Allow request with body being a file and `application/json` content-type. ([PR 363](https://github.com/Azure/autorest.modelerfour/pull/363))
- **Fix** Dictionaries of dictionaries not being modeled as such(`dict[str, object]` instead of `dict[str, dict[str, str]]`). ([PR 372](https://github.com/Azure/autorest.modelerfour/pull/372))
- **Fix** Issue with sibling models(Model just being a ref of another) causing circular dependency exception. ([PR 375](https://github.com/Azure/autorest.modelerfour/pull/375))
- **Fix** Issue with duplicates schemas names due to consequtive name duplicate removal. ([PR 374](https://github.com/Azure/autorest.modelerfour/pull/374))
#### 4.15.x
- Schemas with `x-ms-enum`'s `modelAsString` set to `true` will now be represented as `ChoiceSchema` even with a single value.
- `Accept` headers are now automatically added to operations having responses with content types
- Added `always-seal-x-ms-enum` settings to always create `SealedChoiceSchema` when an `x-ms-enum` is encountered
#### 4.14.x
- added `exception` SchemaContext for `usage` when used as an exception response
- changed `output` SchemaContext for `usage` to no longer include exception response uses
#### 4.13.x
- add security info (checks to see if `input.components?.securitySchemes` has any content)
- sync version of m4 and perks/codemodel == 4.13.x
- adding quality prechecker step as a way to test the OAI document for quality before modelerfour runs.
- report duplicate parents via allOf as an error.
- added `modelerfour.lenient-model-deduplication` to cause schemas with duplicated names to be renamed with an "AutoGenerated" suffix. Note that this is a *temporary* measuer that should only be used when Swaggers cannot be updated easily. This option will be removed in a future version of Modeler Four.
#### 4.12.x
- updated CI to build packages
- any is in a category in schemas
- times is a new category in schemas (not populated yet, next build)
- polymorphic payloads are not flattened (when it's the class that declares the discriminator)
- readonly is pulled from the schema if it's there
- body parameters should have the required flag set correctly
- content-type is now a header parameter (wasn't set before)
- added `modelerfour.always-create-content-type-parameter` to always get the content type parameter even when there are only one option.
- add support for x-ms-api-version extension to force enabling/disabling parameter to be treated as an api-version parameter
- the checker plugin will now halt on errors (can be disabled by `modelerfour.additional-checks: false`)
- when an enum without type is presented, if the values are all strings, assume 'string'
- flatten parents first for consistency
- added choiceType for content-type schema
#### 4.6.x
- add additional checks for empty names, collisions
- fix errant processing on APString => Apstring
- x-ms-client-name fixes on parameters
- added setting for `preserve-uppercase-max-length` to preserve uppercase words up to a certain length.
#### 4.5.x
- static linking libraries for stability
- processed all names in namer, styles can be set in config (see below):
- support overrides in namer
- static linked dependency
#### 4.4.x
- parameter grouping
- some namer changes
#### 4.3.x
- flattening (model and payload) enabled.
- properties should respect x-ms-client-name (many fixes)
- global parameters should try to be in order of original spec
- filter out 'x-ms-original' from extensions
- add serializedName for host parameters
- make sure reused global parameter is added to method too
- processed values in constants/enums a bit better, support AnySchema for no type/format
- support server variable parameters as method unless they have x-ms-parameter-location
#### 4.2.75 - bug fixes:
- add `style` to parameters to support collection format
- `potential-breaking-change` Include common paramters from oai/path #68 (requires fix from autorest-core 3.0.6160+ )
- propogate extensions from server parameters (ie, x-ms-skip-url-encoding) #61
- `potential-breaking-change` make operation groups case insensitive. #59
- `potential-breaking-change` sealedChoice/Choice selection was backwards ( was creating a sealedchoice schema for modelAsString:true and vice versa) #62
- `potential-breaking-change` drop constant schema from response, use constantschema's valueType instead. #63
- `potential-breaking-change` fix body parameter marked as required when not marked so in spec. #64
#### 4.1.60 - add missing serializedName on parameters
- query parameters should have a serializedName so that they don't rely on the cosmetic name property.
#### 4.1.58 - Breaking change:
- version bump, change your configuration to specify version `~4.1.0` or greater
```
use-extension:
"@autorest/modelerfour" : "~4.1.0"
```
- each Http operation (via `.protocol.http`) will now have a separate `path` and `uri` properties.
<br>Both are still templates, and will have parameters.
<br>The parameters for the `uri` property will have `in` set to `ParameterLocation.Uri`
<br>The parameters for the `path` property will continue to have `in` set to `ParameterLocation.Path`
- autorest-core recently added an option to aggressively deduplicate inline models (ie, ones without a name)
and modeler-four based generator will have that enabled by default. (ie `deduplicate-inline-models: true`)
<br>This may increase deduplication time on extremely large openapi models.
- this package contains the initial code for the flattener plugin, however it is not yet enabled.
- updated `@azure-tools/codemodel` package to `3.0.241`:
<br>`uri` (required) was added to `HttpRequest`
<br>`flattenedNames` (optional) was added to `Property` (in anticipation of supporting flattening)

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "@autorest/modelerfour",
"version": "4.15.454",
"version": "4.15.455",
"description": "AutoRest Modeler Version Four (component)",
"directories": {
"doc": "docs"
@ -38,7 +38,6 @@
"homepage": "https://github.com/Azure/autorest.modelerfour/tree/master/modelerfour#readme",
"readme": "https://github.com/Azure/autorest.modelerfour/tree/master/modelerfour/readme.md",
"devDependencies": {
"@types/js-yaml": "~4.0.0",
"@types/node": "~14.14.20",
"@types/jest": "^26.0.20",
"typescript": "~3.9.7",
@ -49,7 +48,6 @@
"source-map-support": "^0.5.19",
"@microsoft.azure/autorest.testserver": "~2.10.46",
"@azure-tools/uri": "~3.0.0",
"js-yaml": "3.13.1",
"jest": "^26.6.3",
"jest-snapshot": "~26.6.2",
"expect": "~26.6.2",
@ -57,7 +55,7 @@
"@azure-tools/codegen": "2.5.290",
"@azure-tools/codegen-csharp": "~3.0.0",
"@azure-tools/autorest-extension-base": "~3.1.0",
"@azure-tools/codemodel": "~4.13.0",
"@autorest/codemodel": "~4.14.3",
"@azure-tools/tasks": "~3.0.0",
"@azure-tools/openapi": "~3.0.0",
"@azure-tools/datastore": "~4.1.0",
@ -71,11 +69,11 @@
"static-link": {
"entrypoints": [],
"dependencies": {
"js-yaml": "3.13.1",
"js-yaml": "~4.0.0",
"@azure-tools/codegen": "~2.4.0",
"@azure-tools/codegen-csharp": "~3.0.0",
"@azure-tools/autorest-extension-base": "~3.1.0",
"@azure-tools/codemodel": "~4.13.0",
"@azure-tools/codemodel": "~4.14.0",
"@azure-tools/tasks": "~3.0.0",
"@azure-tools/openapi": "~3.0.0",
"@azure-tools/datastore": "~4.1.0",

Просмотреть файл

@ -12,7 +12,7 @@ import {
getAllProperties,
ImplementationLocation,
DictionarySchema,
} from "@azure-tools/codemodel";
} from "@autorest/codemodel";
import { Session } from "@azure-tools/autorest-extension-base";
import { values, items, length, Dictionary, refCount, clone } from "@azure-tools/linq";
import { ModelerFourOptions } from "../modeler/modelerfour-options";

Просмотреть файл

@ -5,7 +5,7 @@
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@azure-tools/autorest-extension-base";
import { codeModelSchema, CodeModel } from "@azure-tools/codemodel";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Checker } from "./checker";
export async function processRequest(host: Host) {

Просмотреть файл

@ -1,4 +1,4 @@
import { CodeModel } from "@azure-tools/codemodel";
import { CodeModel } from "@autorest/codemodel";
import { Session } from "@azure-tools/autorest-extension-base";
export class Example {

Просмотреть файл

@ -5,7 +5,7 @@
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@azure-tools/autorest-extension-base";
import { codeModelSchema, CodeModel } from "@azure-tools/codemodel";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Example } from "./example";
export async function processRequest(host: Host) {

Просмотреть файл

@ -12,7 +12,7 @@ import {
getAllProperties,
ImplementationLocation,
Request,
} from "@azure-tools/codemodel";
} from "@autorest/codemodel";
import { Session } from "@azure-tools/autorest-extension-base";
import { values, items, length, Dictionary, refCount, clone } from "@azure-tools/linq";
import { ModelerFourOptions } from "../modeler/modelerfour-options";

Просмотреть файл

@ -5,7 +5,7 @@
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@azure-tools/autorest-extension-base";
import { codeModelSchema, CodeModel } from "@azure-tools/codemodel";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Flattener } from "./flattener";
export async function processRequest(host: Host) {

Просмотреть файл

@ -14,7 +14,7 @@ import {
OperationGroup,
Request,
SchemaContext,
} from "@azure-tools/codemodel";
} from "@autorest/codemodel";
import { Session } from "@azure-tools/autorest-extension-base";
import { values, items, length, Dictionary, refCount, clone } from "@azure-tools/linq";
import { pascalCase, camelCase } from "@azure-tools/codegen";

Просмотреть файл

@ -5,7 +5,7 @@
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@azure-tools/autorest-extension-base";
import { codeModelSchema, CodeModel } from "@azure-tools/codemodel";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Grouper } from "./grouper";
export async function processRequest(host: Host) {

Просмотреть файл

@ -9,7 +9,7 @@ import {
Deprecation,
ChoiceValue,
SetType,
} from "@azure-tools/codemodel";
} from "@autorest/codemodel";
import { StringFormat, JsonType, ParameterLocation } from "@azure-tools/openapi";
import { getPascalIdentifier } from "@azure-tools/codegen";

Просмотреть файл

@ -71,7 +71,7 @@ import {
OperationGroup,
TimeSchema,
HttpMultipartRequest,
} from "@azure-tools/codemodel";
} from "@autorest/codemodel";
import { Session, Channel } from "@azure-tools/autorest-extension-base";
import { Interpretations, XMSEnum } from "./interpretations";
import { fail, minimum, pascalCase, knownMediaType, KnownMediaType } from "@azure-tools/codegen";

Просмотреть файл

@ -7,7 +7,7 @@ import { deserialize, serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@azure-tools/autorest-extension-base";
import * as OpenAPI from "@azure-tools/openapi";
import { ModelerFour } from "./modelerfour";
import { codeModelSchema, CodeModel } from "@azure-tools/codemodel";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
export async function processRequest(host: Host) {
const debug = (await host.GetValue("debug")) || false;

Просмотреть файл

@ -1,4 +1,4 @@
import { Languages } from "@azure-tools/codemodel";
import { Languages } from "@autorest/codemodel";
import { length, Dictionary } from "@azure-tools/linq";
import { removeSequentialDuplicates, fixLeadingNumber, deconstruct, Style, Styler } from "@azure-tools/codegen";

Просмотреть файл

@ -5,7 +5,7 @@
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@azure-tools/autorest-extension-base";
import { codeModelSchema, CodeModel } from "@azure-tools/codemodel";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { PreNamer } from "./prenamer";
export async function processRequest(host: Host) {

Просмотреть файл

@ -16,7 +16,7 @@ import {
StringSchema,
SealedChoiceSchema,
PrimitiveSchema,
} from "@azure-tools/codemodel";
} from "@autorest/codemodel";
import { Session } from "@azure-tools/autorest-extension-base";
import { values, length, Dictionary, items } from "@azure-tools/linq";
import { selectName, Style, Styler } from "@azure-tools/codegen";

Просмотреть файл

@ -1,4 +1,4 @@
import { CodeModel } from "@azure-tools/codemodel";
import { CodeModel } from "@autorest/codemodel";
import { Model } from "@azure-tools/openapi";
import { ModelerFour } from "../../src/modeler/modelerfour";
import { ModelerFourOptions } from "modeler/modelerfour-options";

Просмотреть файл

@ -9,7 +9,7 @@ import {
SealedChoiceSchema,
DictionarySchema,
Operation,
} from "@azure-tools/codemodel";
} from "@autorest/codemodel";
import { addOperation, addSchema, createTestSpec, InitialTestSpec, response, responses } from "../utils";
import { runModeler } from "./modelerfour-utils";

Просмотреть файл

@ -1,4 +1,4 @@
import { CodeModel, ObjectSchema } from "@azure-tools/codemodel";
import { CodeModel, ObjectSchema } from "@autorest/codemodel";
import { ModelerFourOptions } from "modeler/modelerfour-options";
import { PreNamer } from "../../src/prenamer/prenamer";
import { createTestSessionFromModel } from "../utils";

Просмотреть файл

@ -3,7 +3,7 @@ import { ModelerFour } from "../../src/modeler/modelerfour";
import { readdirSync } from "fs";
import { serialize } from "@azure-tools/codegen";
import { Model } from "@azure-tools/openapi";
import { codeModelSchema } from "@azure-tools/codemodel";
import { codeModelSchema } from "@autorest/codemodel";
const cfg = {
"modelerfour": {

Просмотреть файл

@ -79,7 +79,7 @@ function sortWithPriorty(a, b) {
function serialize(model) {
return jsyaml.dump(model, {
sortKeys: sortWithPriorty,
schema: jsyaml.DEFAULT_SCHEMA,
schema: jsyaml.DEFAULT_SAFE_SCHEMA,
skipInvalid: true,
lineWidth: 240
}).

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@autorest/codemodel",
"entries": [
{
"version": "4.14.3",
"tag": "@autorest/codemodel_v4.14.3",
"date": "Tue, 26 Jan 2021 21:36:02 GMT",
"comments": {
"patch": [
{
"comment": "Revert js-yaml to 3.x"
}
]
}
}
]
}

Просмотреть файл

@ -0,0 +1,11 @@
# Change Log - @autorest/codemodel
This log was last generated on Tue, 26 Jan 2021 21:36:02 GMT and should not be manually modified.
## 4.14.3
Tue, 26 Jan 2021 21:36:02 GMT
### Patches
- Revert js-yaml to 3.x

Просмотреть файл

@ -1,4 +0,0 @@
# Change Log - @azure-tools/codemodel-v3
# 3/28/2019
- republishing to force change in package dependency chain.

Просмотреть файл

@ -1,4 +1,4 @@
import { Schema, Type, DEFAULT_SCHEMA } from 'js-yaml';
import { Schema, Type, DEFAULT_SAFE_SCHEMA } from "js-yaml";
import { CodeModel, Security } from './common/code-model';
import { Metadata, CSharpLanguage, Language } from './common/metadata';
@ -38,7 +38,7 @@ function TypeInfo<U extends new (...args: any) => any>(type: U) {
return new Type(`!${type.name}`, { kind: 'mapping', instanceOf: type, construct: (i) => Object.setPrototypeOf(i, type.prototype) });
}
export const codeModelSchema = DEFAULT_SCHEMA.extend([
export const codeModelSchema = Schema.create(DEFAULT_SAFE_SCHEMA, [
TypeInfo(Security),
TypeInfo(HttpModel),

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "@autorest/codemodel",
"version": "4.14.2",
"version": "4.14.3",
"description": "AutoRest code model library",
"directories": {
"doc": "docs"
@ -35,7 +35,7 @@
"homepage": "https://github.com/Azure/autorest/tree/master/packages/libs/codemodel#readme",
"readme": "https://github.com/Azure/autorest/tree/master/packages/libs/codemodel/readme.md",
"devDependencies": {
"@types/js-yaml": "~4.0.0",
"@types/js-yaml": "3.12.1",
"@types/mocha": "5.2.5",
"@types/node": "~14.14.20",
"mocha": "5.2.0",
@ -46,14 +46,14 @@
"eslint": "^7.17.0",
"typescript": "~3.9.7",
"glob": "~7.1.4",
"js-yaml": "~4.0.0",
"typescript-json-schema": "~0.40.0",
"ts-morph": "~4.0.1"
},
"dependencies": {
"@azure-tools/autorest-extension-base": "~3.1.0",
"@azure-tools/codegen": "2.5.290",
"@azure-tools/linq": "~3.1.0"
"@azure-tools/linq": "~3.1.0",
"js-yaml": "3.13.1"
},
"publishConfig": {
"access": "public"