Skip to content

Commit

Permalink
Allow x-ms-paths not to start with / (#4152)
Browse files Browse the repository at this point in the history
* Allow x-ms-paths not to start with /

* .

* emptyh path

* /

* bump
  • Loading branch information
timotheeguerin authored Jun 4, 2021
1 parent c2906af commit cc9a25e
Show file tree
Hide file tree
Showing 24 changed files with 152 additions and 52 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 15 additions & 0 deletions packages/apps/autorest/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "autorest",
"entries": [
{
"version": "3.2.3",
"tag": "autorest_v3.2.3",
"date": "Thu, 03 Jun 2021 22:37:55 GMT",
"comments": {
"dependency": [
{
"comment": "Updating dependency \"@autorest/configuration\" from `~1.4.1` to `~1.5.0`"
},
{
"comment": "Updating dependency \"@autorest/core\" from `~3.4.4` to `~3.4.5`"
}
]
}
},
{
"version": "3.2.2",
"tag": "autorest_v3.2.2",
Expand Down
7 changes: 6 additions & 1 deletion packages/apps/autorest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - autorest

This log was last generated on Wed, 26 May 2021 18:31:17 GMT and should not be manually modified.
This log was last generated on Thu, 03 Jun 2021 22:37:55 GMT and should not be manually modified.

## 3.2.3
Thu, 03 Jun 2021 22:37:55 GMT

_Version update only_

## 3.2.2
Wed, 26 May 2021 18:31:17 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/apps/autorest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "autorest",
"version": "3.2.2",
"version": "3.2.3",
"description": "The AutoRest tool generates client libraries for accessing RESTful web services. Input to AutoRest is an OpenAPI spec that describes the REST API.",
"engines": {
"node": ">=10.13.0"
Expand Down Expand Up @@ -40,8 +40,8 @@
},
"typings": "./dist/exports.d.ts",
"devDependencies": {
"@autorest/configuration": "~1.4.1",
"@autorest/core": "~3.4.4",
"@autorest/configuration": "~1.5.0",
"@autorest/core": "~3.4.5",
"@azure-tools/async-io": "~3.0.0",
"@azure-tools/extension": "~3.2.7",
"@azure-tools/tasks": "~3.0.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/extensions/adl/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@autorest/adl",
"entries": [
{
"version": "0.0.1",
"tag": "@autorest/adl_v0.0.1",
"date": "Thu, 03 Jun 2021 22:37:55 GMT",
"comments": {}
}
]
}
9 changes: 9 additions & 0 deletions packages/extensions/adl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log - @autorest/adl

This log was last generated on Thu, 03 Jun 2021 22:37:55 GMT and should not be manually modified.

## 0.0.1
Thu, 03 Jun 2021 22:37:55 GMT

_Initial release_

20 changes: 20 additions & 0 deletions packages/extensions/core/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
{
"name": "@autorest/core",
"entries": [
{
"version": "3.4.5",
"tag": "@autorest/core_v3.4.5",
"date": "Thu, 03 Jun 2021 22:37:55 GMT",
"comments": {
"patch": [
{
"comment": "Blaming files not loaded by autorest"
}
],
"dependency": [
{
"comment": "Updating dependency \"@autorest/configuration\" from `~1.4.1` to `~1.5.0`"
},
{
"comment": "Updating dependency \"@autorest/schemas\" from `~1.1.3` to `~1.1.4`"
}
]
}
},
{
"version": "3.4.4",
"tag": "@autorest/core_v3.4.4",
Expand Down
9 changes: 8 additions & 1 deletion packages/extensions/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @autorest/core

This log was last generated on Wed, 26 May 2021 18:31:17 GMT and should not be manually modified.
This log was last generated on Thu, 03 Jun 2021 22:37:55 GMT and should not be manually modified.

## 3.4.5
Thu, 03 Jun 2021 22:37:55 GMT

### Patches

- Blaming files not loaded by autorest

## 3.4.4
Wed, 26 May 2021 18:31:17 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/extensions/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/core",
"version": "3.4.4",
"version": "3.4.5",
"description": "AutoRest core module",
"engines": {
"node": ">=10.13.0"
Expand Down Expand Up @@ -40,8 +40,8 @@
"typings": "./dist/exports.d.ts",
"devDependencies": {
"@autorest/common": "~1.1.4",
"@autorest/configuration": "~1.4.1",
"@autorest/schemas": "~1.1.3",
"@autorest/configuration": "~1.5.0",
"@autorest/schemas": "~1.1.4",
"@autorest/test-utils": "~0.2.2",
"@azure-tools/async-io": "~3.0.0",
"@azure-tools/codegen": "~2.5.294",
Expand Down
12 changes: 12 additions & 0 deletions packages/extensions/modelerfour/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@autorest/modelerfour",
"entries": [
{
"version": "4.19.3",
"tag": "@autorest/modelerfour_v4.19.3",
"date": "Thu, 03 Jun 2021 22:37:55 GMT",
"comments": {
"patch": [
{
"comment": "**Fix** Allow empty paths in operation"
}
]
}
},
{
"version": "4.19.2",
"tag": "@autorest/modelerfour_v4.19.2",
Expand Down
9 changes: 8 additions & 1 deletion packages/extensions/modelerfour/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @autorest/modelerfour

This log was last generated on Thu, 20 May 2021 16:41:13 GMT and should not be manually modified.
This log was last generated on Thu, 03 Jun 2021 22:37:55 GMT and should not be manually modified.

## 4.19.3
Thu, 03 Jun 2021 22:37:55 GMT

### Patches

- **Fix** Allow empty paths in operation

## 4.19.2
Thu, 20 May 2021 16:41:13 GMT
Expand Down
2 changes: 1 addition & 1 deletion packages/extensions/modelerfour/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/modelerfour",
"version": "4.19.2",
"version": "4.19.3",
"description": "AutoRest Modeler Version Four (component)",
"directories": {
"doc": "docs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export class Interpretations {

/** gets the operation path from metadata, falls back to the OAI3 path key */
getPath(pathItem: OpenAPI.PathItem, operation: OpenAPI.HttpOperation, path: string) {
return this.xmsMeta(pathItem, "path") || this.xmsMeta(operation, "path") || path;
return this.xmsMeta(pathItem, "path") ?? this.xmsMeta(operation, "path") ?? path;
}

/*
Expand Down
12 changes: 12 additions & 0 deletions packages/libs/autorest-schemas/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@autorest/schemas",
"entries": [
{
"version": "1.1.4",
"tag": "@autorest/schemas_v1.1.4",
"date": "Thu, 03 Jun 2021 22:37:55 GMT",
"comments": {
"patch": [
{
"comment": "Allow x-ms-paths not to start with /"
}
]
}
},
{
"version": "1.1.3",
"tag": "@autorest/schemas_v1.1.3",
Expand Down
9 changes: 8 additions & 1 deletion packages/libs/autorest-schemas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @autorest/schemas

This log was last generated on Thu, 20 May 2021 16:41:13 GMT and should not be manually modified.
This log was last generated on Thu, 03 Jun 2021 22:37:55 GMT and should not be manually modified.

## 1.1.4
Thu, 03 Jun 2021 22:37:55 GMT

### Patches

- Allow x-ms-paths not to start with /

## 1.1.3
Thu, 20 May 2021 16:41:13 GMT
Expand Down
2 changes: 1 addition & 1 deletion packages/libs/autorest-schemas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/schemas",
"version": "1.1.3",
"version": "1.1.4",
"description": "Internal package storing schemas",
"scripts": {
"test": "echo 'No Test'",
Expand Down
11 changes: 10 additions & 1 deletion packages/libs/autorest-schemas/swagger-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,16 @@
]
},
"xmsPaths": {
"$ref": "#/definitions/paths"
"type": "object",
"description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.",
"patternProperties": {
"^x-.*$": {
"$ref": "#/definitions/vendorExtension"
}
},
"additionalProperties": {
"$ref": "#/definitions/pathItem"
}
},
"xmsExternal": {
"type": "boolean"
Expand Down
12 changes: 12 additions & 0 deletions packages/libs/configuration/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@autorest/configuration",
"entries": [
{
"version": "1.5.0",
"tag": "@autorest/configuration_v1.5.0",
"date": "Thu, 03 Jun 2021 22:37:55 GMT",
"comments": {
"minor": [
{
"comment": "Add support for adl"
}
]
}
},
{
"version": "1.4.1",
"tag": "@autorest/configuration_v1.4.1",
Expand Down
9 changes: 8 additions & 1 deletion packages/libs/configuration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @autorest/configuration

This log was last generated on Wed, 26 May 2021 18:31:17 GMT and should not be manually modified.
This log was last generated on Thu, 03 Jun 2021 22:37:55 GMT and should not be manually modified.

## 1.5.0
Thu, 03 Jun 2021 22:37:55 GMT

### Minor changes

- Add support for adl

## 1.4.1
Wed, 26 May 2021 18:31:17 GMT
Expand Down
2 changes: 1 addition & 1 deletion packages/libs/configuration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/configuration",
"version": "1.4.1",
"version": "1.5.0",
"description": "Autorest configuration",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/testing/test-public-packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"homepage": "https://github.com/Azure/autorest#readme",
"dependencies": {
"@autorest/core": "~3.4.4",
"autorest": "~3.2.2",
"@autorest/core": "~3.4.5",
"autorest": "~3.2.3",
"source-map-support": "^0.5.19"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/compare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"homepage": "https://github.com/Azure/autorest.compare#readme",
"dependencies": {
"autorest": "~3.2.2",
"autorest": "~3.2.3",
"chalk": "^4.1.0",
"diff": "^4.0.1",
"js-yaml": "~4.0.0",
Expand Down

0 comments on commit cc9a25e

Please sign in to comment.