Displaying ENUM in lower/camelCase
Hi there, Hope you're having a nice day. We use swagger ui and spring boot in our project. In our REST webservice, we have ENUM as parameter. On UI side, these enums are displayed in UPPER case because that's how they are defined in code. Is there a way to control how they are displayed on swagger ui. We want to display them in lower/camelCase.Solved1.8KViews0likes1CommentEnum of possible options for TestComplete Element not showing up in Autocomplete / Code Completion
I have a question, I have a small script used to select values for different controls on a webpage. Because these values are finite, they are a perfect candidate for an Enum, so as to reduce the possibility of someone having a typo in text, and also to properly reference values in case they need to change in the future. Please see what I have below: const assuranceLevel = Object.freeze({ LOW: {value: 1, name: ' Low '}, MODERATE: {value: 2, name: ' Moderate '}, HIGH: {value: 3, name: ' High '}, VERY_HIGH: {value: 4, name: ' Very High '} }); function locateButtonGroup (buttonGroupTitleString) { return page.FindChildByXPath("//h4[text()='" + buttonGroupTitleString + "']/parent::div"); } function selectLevel(buttonGroupElement, assuranceLevel) { buttonGroupElement.FindChildByXPath("./descendant::label[contains(text(), '" + assuranceLevel.name + "')]").Click(); } function testPage() { selectLevel(locateButtonGroup("Overall SAL"), assuranceLevel.VERY_HIGH); selectLevel(locateButtonGroup("Confidentiality"), assuranceLevel.MODERATE); selectLevel(locateButtonGroup("Integrity"), assuranceLevel.VERY_HIGH); selectLevel(locateButtonGroup("Availability"), assuranceLevel.MODERATE); } This works as expected, and I can use one of the "assuranceLevel" options to constrain my choices to valid inputs. However, when typing assuranceLevel, when I hit the ".", I would expect an autocomplete window to come up, allowing me to select one of the viable options. That does not happen, and I have to type out the option. This defeats the entire purpose of using the enum in the first place, as the possibilities for typos still exist. It's frustrating that VSCode and sublime text editor can do this just fine, but TestComplete can't. Is there any way to get TestComplete to display options from enums in autocomplete?Solved1.7KViews0likes7CommentsSwagger codegen for enum with Data Annotations
When i try to convert the below enum property, it doesn't change as expected. I used the nswag to generate the code in typescript from my EF core API, the enum based class doesn't convert as expected when using [DisplayName] or [Description] DataAnnotation. Property: [Description("26\"")] TwentySix = 1, Output: export enum Sizes { TwentySix = 1, } Expectation: export enum Sizes { 26"= 1, } Added the below code in the "ConfigureServices", services.AddMvc().AddJsonOptions(options => options.SerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver()); Or services.AddMvc().AddJsonOptions(options => options.SerializerSettings.Converters.Add(new StringEnumConverter())); In nswag.json, Under "codeGenerators" i have the below property, "enumNameGeneratorType": null, My other service method and classes are working fine. The " Description " attribute didn't work, tried " DisplayName " too. What should i change here?