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

fix: Open API generator config - protected keyword #437

Conversation

petermetz
Copy link
Contributor

This changes makes it so that model properties named protected will
no longer get mangled by the OpenAPI generator into _protected.
This is needed so that our generated models can be compliant with the
JWS RFC 1

Since protected is only a softly reserved keyword, this means that
you can still declare classes/interfaces with fields that are called
protected which is what we need since the RFC mentioned above
declares exactly that for JWS recipients.

Fixes #436

Signed-off-by: Peter Somogyvari peter.somogyvari@accenture.com

This changes makes it so that model properties named `protected` will
no longer get mangled by the OpenAPI generator into `_protected`.
This is needed so that our generated models can be compliant with the
JWS RFC [1]

Since `protected` is only a softly reserved keyword, this means that
you can still declare classes/interfaces with fields that are called
`protected` which is what we need since the RFC mentioned above
declares exactly that for JWS recipients.

[1]: https://tools.ietf.org/html/rfc7515

Fixes hyperledger-cacti#436

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz petermetz added bug Something isn't working API_Server dependencies Pull requests that update a dependency file labels Dec 17, 2020
@petermetz petermetz added this to the v0.3.0 milestone Dec 17, 2020
Copy link
Contributor

@jonathan-m-hamilton jonathan-m-hamilton left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@takeutak takeutak left a comment

Choose a reason for hiding this comment

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

LGTM

@petermetz petermetz merged commit 57e52f4 into hyperledger-cacti:master Jan 5, 2021
@petermetz petermetz deleted the fix/openapi/generator-config-protected-keyword-436 branch January 5, 2021 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API_Server bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: OpenAPI generator config - protected keyword
3 participants