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

W+ enum leads to sdk creation problems #383

Open
raffis opened this issue Oct 10, 2019 · 0 comments
Open

W+ enum leads to sdk creation problems #383

raffis opened this issue Oct 10, 2019 · 0 comments
Labels
Milestone

Comments

@raffis
Copy link
Contributor

raffis commented Oct 10, 2019

Describe the bug

The enum w+ in the openapi/swagger specs lead to problems since clients are generated with stripping the + which leads to double constants (W).

            access:
              description: Access level.
              type: string
              default: rw
              enum:
                - rw
                - w
                - m
                - w+
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;

	ignoring go.mod;

	see 'go help modules'

github.com/gyselroth/balloon-sdk-go/models

# github.com/gyselroth/balloon-sdk-go/models

models/core_v2_acl_rule.go:83:2: CoreV2ACLRulePrivilegeW redeclared in this block

	previous declaration at models/core_v2_acl_rule.go:77:35

The same applies to openapi-codegen for the php sdk.

Expected behavior

Rename the enum to "rp" (read plus => read/write owned files, no access to non owned).
Attention: This changes requires a migration since all access rules use "w+" and also requires minimal changes in the access control (rename const).

Environment

  • balloon server version: v2.6.5
@raffis raffis added the bug label Oct 10, 2019
@raffis raffis added this to the 2.7.x milestone Oct 10, 2019
@raffis raffis modified the milestones: 2.7.x, 3.0.x Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant