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

C# convert special chars to enum #3500

Closed
iozcelik opened this issue Oct 16, 2023 · 2 comments · Fixed by #3510
Closed

C# convert special chars to enum #3500

iozcelik opened this issue Oct 16, 2023 · 2 comments · Fixed by #3510
Assignees
Labels
enhancement New feature or request generator Issues or improvements relater to generation capabilities. WIP
Milestone

Comments

@iozcelik
Copy link
Contributor

In Atlassian Open Api, there is an enum for queries and it contains some chars. C# generator converts lots of them correctly. However it does not convert 2 of them (~, ~=).

..."FieldValueClause":{
"required":["field","operand","operator"],
"type":"object",
"properties":{"field":{"$ref":"#/components/schemas/JqlQueryField"},
"operand":{"$ref":"#/components/schemas/JqlQueryClauseOperand"},
"operator":{"type":"string",
"description":"The operator between the field and operand.",
"enum":["=","!=",">","<",">=","<=","in","not in","~","~=","is","is not"]}},
"description":"A clause that asserts the current value of a field. For example, `summary ~ test`."}...

Generated client code is:

public enum FieldValueClause_operator {
        [EnumMember(Value = "=")]
        Equal,
        [EnumMember(Value = "!=")]
        ExclamationEqual,
        [EnumMember(Value = ">")]
        GreaterThan,
        [EnumMember(Value = "<")]
        LessThan,
        [EnumMember(Value = ">=")]
        GreaterThanEqual,
        [EnumMember(Value = "<=")]
        LessThanEqual,
        [EnumMember(Value = "in")]
        In,
        [EnumMember(Value = "not in")]
        NotIn,
        [EnumMember(Value = "~")]
        ~, //not valid
        [EnumMember(Value = "~=")]
        ~=, //not valid
        [EnumMember(Value = "is")]
        Is,
        [EnumMember(Value = "is not")]
        IsNot,
}
@github-project-automation github-project-automation bot moved this to Todo in Kiota Oct 16, 2023
@baywet baywet self-assigned this Oct 16, 2023
@baywet baywet added enhancement New feature or request generator Issues or improvements relater to generation capabilities. labels Oct 16, 2023
@baywet baywet assigned iozcelik and unassigned baywet Oct 16, 2023
@baywet baywet added this to the Kiota v1.8 milestone Oct 16, 2023
@baywet
Copy link
Member

baywet commented Oct 16, 2023

Hi @iozcelik
Thanks for using kiota and for reaching out.
Adding a Tilde ~ entry here should fix your issue.
Is this something you'd be willing to submit a pull request for?

@iozcelik
Copy link
Contributor Author

Hi @baywet , of course I will do in morning as soon as possible. Thanks.

iozcelik added a commit to iozcelik/kiota that referenced this issue Oct 17, 2023
iozcelik added a commit to iozcelik/kiota that referenced this issue Oct 19, 2023
iozcelik added a commit to iozcelik/kiota that referenced this issue Oct 19, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Kiota Oct 19, 2023
baywet added a commit that referenced this issue Oct 19, 2023
Tilda added to SpelledOutSymbols #3500
andreaTP pushed a commit to andreaTP/kiota that referenced this issue Oct 20, 2023
andreaTP pushed a commit to andreaTP/kiota that referenced this issue Oct 20, 2023
andreaTP pushed a commit to andreaTP/kiota that referenced this issue Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request generator Issues or improvements relater to generation capabilities. WIP
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants