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

openapi: Add default values to the thing_mount_path parameters #18935

Merged
merged 5 commits into from
Feb 1, 2023

Conversation

averche
Copy link
Contributor

@averche averche commented Feb 1, 2023

For generic_mount_path=true passed to the openapi endpoint, the following changes will be applied in the openapi.json for each _mount_path parameter. These changes are needed for proper library code generation.

        {
          "name": "alicloud_mount_path",
          "description": "Path that the backend was mounted at",
          "in": "path",
          "schema": {
            "type": "string",
++          "default": "alicloud"
          },
--        "required": true
        }
        "post": {
++        "operationId": "postAuthAlicloudLogin",
--        "operationId": "postAuthAlicloud_mount_pathLogin",

@averche averche added this to the 1.13.0-rc1 milestone Feb 1, 2023
@averche averche marked this pull request as ready for review February 1, 2023 00:13
Copy link
Contributor

@AnPucel AnPucel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@averche averche enabled auto-merge (squash) February 1, 2023 00:37
@averche averche merged commit 6a9ca26 into main Feb 1, 2023
},
Required: true,
Required: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@averche This change re-adds something we previously reverted... it violates the OpenAPI spec.

When "in" is "path", "required" MUST be true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I'll put in a PR to fix this. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants