question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enums with dots in their names cause an error

See original GitHub issue

What are the steps to reproduce this issue?

  1. Make a swagger schema with an enum that contains a dot in the name foo.bar
  2. Use it inside a definition
{
   "web.foo": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "foo": {
                    "type": "string",
                    "enum": [
                        "high",
                        "medium",
                        "low"
                    ]
                }
            }
        }
}

What happens?

The generated code is wrong: image

What were you expecting to happen?

The dot to be removed

What versions are you using?

Operating System: macOS Big Sur Package Version: 5.4.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
fr3foucommented, Jun 4, 2021

Thank you so much! Great job with this tool, been loving it!

1reaction
anymaniaxcommented, Jun 4, 2021

I fixed the problem in the 5.4.6 normally

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enum not accept item with dot('.') - MSDN - Microsoft
Hi. I want to create an enum that represented provider name for DbProviderFactories.GetFactory(providerName) in my function.
Read more >
How can include a dot character in enum type name in ...
You're probably getting an error because you're trying to assign a value to the filterType member on a class called Filter , but...
Read more >
Allow for shorter dot syntax to access enum values · Issue #357
If I write .north , then the compiler has to look for all enums that are available (say, any where the name of...
Read more >
Enumerations - Scala 3 - EPFL
The valueOf method obtains an enum value by its name. The values method returns all enum values defined in an enumeration in an...
Read more >
How To Use An Enum | C# Tutorial For Beginners - YouTube
In this C# tutorial I will teach about enums and structs which are a type of "mini objects" we can use in our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found