Skip to content

Conversation

brennantaylor
Copy link
Contributor

@brennantaylor brennantaylor commented Jan 22, 2021

📝 Description

The kotlin poet api takes as first argument a format parameter for addKdoc().
So comments with percent signs would cause the format argument parser to error.

🔗 Related Issues

Resolves: #1023

closes ExpediaGroup#1023

The kotlin poet api takes as first argument a format parameter for `addKdoc()`.
So comments with percent signs would cause the format argument parser to error.

val unkownTypeSpec = TypeSpec.anonymousClassBuilder()
.addKdoc("This is a default enum value that will be used when attempting to deserialize unknown value.")
.addKdoc("%L", "This is a default enum value that will be used when attempting to deserialize unknown value.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

since the passed in text is a constant without any special chars we technically don't need the extra formatting here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough. I figured the consistency was more important.

@dariuszkuc dariuszkuc added changes: patch Changes require a patch version module: client Issue affects the client code type: bug Something isn't working labels Jan 22, 2021
@dariuszkuc dariuszkuc merged commit 4873c3d into ExpediaGroup:master Jan 22, 2021
@brennantaylor brennantaylor deleted the fix-passing-doc-string-as-format-parameter branch January 22, 2021 22:04
huehnerlady pushed a commit to huehnerlady/graphql-kotlin that referenced this pull request Apr 27, 2021
closes ExpediaGroup#1023

The kotlin poet api takes as first argument a format parameter for `addKdoc()`.
So comments with percent signs would cause the format argument parser to error.
dariuszkuc pushed a commit to dariuszkuc/graphql-kotlin that referenced this pull request Aug 5, 2022
closes ExpediaGroup#1023

The kotlin poet api takes as first argument a format parameter for `addKdoc()`.
So comments with percent signs would cause the format argument parser to error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes: patch Changes require a patch version module: client Issue affects the client code type: bug Something isn't working

Development

Successfully merging this pull request may close these issues.

"%" in schema comments is not escaped, causing KotlinPoet failure.

2 participants