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 CLI casing formatter flag --casing erroring with specific casings #408

Open
RichardAkman opened this issue Apr 14, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@RichardAkman
Copy link
Contributor

Current Behavior

Some casing flags result in an error due to containing whitespace and other characters that are invalid.

List of casing patterns that cause errors:

  • CapitalCase
  • DotCase
  • NoCase
  • PathCase
  • SentenceCase

Expected Behavior

All casing formatter options should result in valid keys.

To Reproduce

Use any schema that has a key that contains more than 1 words, for example:

{
  "GREETING": {
    "type": "RegEx",
    "pattern": "^(hello|hey|welcome|hola|salute|bonjour|shalom|marhabaan)$",
    "default": "hello"
  },
  "SUBJECT": {
    "type": "String",
    "default": "world"
  },
  "USER_MESSAGE": {
    "type": "String",
    "template": "{{GREETING}}, {{SUBJECT}}!",
    "description": "Generates a full greeting message"
  }
}

Then use export with any of the mentioned casing formatters which will result in:

Error: invalid config key at ExportCommand:.ConfigKey:USER_MESSAGE, key "USER_MESSAGE" mustn't contain reserved words

Context

No response

@RichardAkman RichardAkman added the bug Something isn't working label Apr 14, 2024
@RichardAkman RichardAkman linked a pull request Apr 14, 2024 that will close this issue
@RichardAkman
Copy link
Contributor Author

@rannn505 please give your opinion on handling this bug in a way that aligns with the product vision.

@hanshal101
Copy link

hanshal101 commented Apr 25, 2024

Hey @RichardAkman I would like to work on this issue. Can you walk me through this issue.

@Sadaf-A
Copy link
Contributor

Sadaf-A commented Apr 26, 2024

Hey @RichardAkman !
I would like to work on this issue

@RichardAkman
Copy link
Contributor Author

Hi @Sadaf-A & @hanshal101, I'm really happy to see your enthusiasm. Currently, this issue is pending product input regarding how to go about solving it. Once we have a clearly defined approach that aligns with the product vision, I'll reach out and let you know that this issue is ready to be taken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants