-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Properly decode $ref #7191
Properly decode $ref #7191
Conversation
e406d53
to
d492ce2
Compare
ref = URLDecoder.decode(ref, "UTF-8"); | ||
} catch (UnsupportedEncodingException ignored) { | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we decode it at the start of the function getSimpleRef
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested comment on the escapes, so they don't get removed accidentally in the future.
modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java
Show resolved
Hide resolved
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
I've added OAS 3.0 spec support because the JSON pointer escapes make sense for refs pointing to operations/paths. I think this approach is good to merge even before we cut 5.0.0-beta2. Any thoughts @wing328? |
* master: (1557 commits) [docs] Add notes on Windows classpath modification (OpenAPITools#7404) [C#][netcore] better support for additional properties in the payload (OpenAPITools#7396) Fix the ECDSA signature issue for PowerShellSDK (OpenAPITools#7386) Fix the new package that deal with Configuration (the old one is depecrated) (OpenAPITools#7391) update vonage logo (OpenAPITools#7387) [gradle][plugin] Fix tests (OpenAPITools#7384) [typescript] Fix incorrect enum literal case (OpenAPITools#7378) Rust reqwest/api_mustache Missing api Vec in parameter (OpenAPITools#7049) [kotlin] Fix imports of generated class (OpenAPITools#7314) Properly decode $ref (OpenAPITools#7191) fix typo, update caption feat(r): retry configuration for status codes (OpenAPITools#5925) [json][codegen] Add option: outputFileName (OpenAPITools#7348) RSACng class is not supported on linux replacing it by RSA (OpenAPITools#7349) Adds cookie auth support to ApiKeyAuth in dart2 templates (OpenAPITools#7346) [js][flowtype] Bump lodash from 4.17.15 to 4.17.19 (OpenAPITools#7359) Bugfix swift5 code generation 2966 (OpenAPITools#7301) Syncs validation properties for arraymodels (OpenAPITools#7357) Subclass Python exceptions (OpenAPITools#7321) Adds fix for issue7262 and a test of it (OpenAPITools#7328) ...
fixes #5720
PR checklist
./bin/generate-samples.sh
to update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH.master