Questions tagged [codegen]

Use codegen for questions related to language features or tools which facilitate translating code between languages or creating code from metadata

References

242 questions
2
votes
1 answer

React native ios build failed showing multiple instances of the same simulator and same UDID, "com.apple.compilers.llvm.clang.1_0.compiler" flagged

2023-04-10 12:54:39.743 xcodebuild[37229:209830] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled) --- xcodebuild: WARNING: Using the first of multiple matching destinations: {…
Devansh Nigam
  • 59
  • 1
  • 6
2
votes
1 answer

JiBX Code-Gen Error: Duplicate name on format element at

I am trying to generate code (with customizations applied) for OTA schema available at [OTA2003B] ( http://www.opentravel.org/Specifications/SchemaIndex.aspx?FolderName=2003B ) using JiBX Code Gen tool.Following is the code I have written to achieve…
Jignesh Gohel
  • 6,236
  • 6
  • 53
  • 89
2
votes
1 answer

Troubleshooting deepcopy-gen not generating deepcopy functions for custom Kubernetes API server

I am trying to create a custom kubernetes api server, and I have defined the types.go file in the directory pkg/apis/baz/v1alpha1, package v1alpha1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient //…
imawful
  • 69
  • 5
2
votes
0 answers

How to create own generator with the Flutter engine

When you do i18n in Flutter you can define a generate:true flag in pubspec.yaml which tells the framework to create and recreate a .dart_tool/flutter_gen/gen_l10n dir with the translations of the project on every hot restart. Is that extensible? I…
Nico Rodsevich
  • 2,393
  • 2
  • 22
  • 32
2
votes
1 answer

GraphQL netflix-dgs codegen generateJava imports java.util unnecessarily

I added the following type and enum to my schema.graphql enum Currency { USD EUR GBP AUD CAD ILS HKD SEK NZD SGD CHF ZAR BRL CNY INR MYR MXN PKR PHP TWD THB TRY …
2
votes
2 answers

How to have multiple infinite objects without an array - Open API / Swagger

I'm trying to setup an open api spec for the following snippet of JSON: "test1": { "1739573957": { "tester1": 123, "tester2": "Company" …
2
votes
4 answers

Parse the .dbc file and generate C++ code to represent classes/struct for each message( for target ECU )

I am trying to generate C++ code from a .dbc file. e.g. A message is defined like following in .dbc file BO_ 500 IO_DEBUG: 5 IO SG_ IO_DEBUG_test_unsigned : 0|8@1+ (1,0) [0|0] "" DBG SG_ IO_DEBUG_test_signed : 8|8@1- (1,-128) [0|0] "" DBG SG_…
sahn
  • 51
  • 2
  • 10
2
votes
1 answer

Code generation with jooq and gradle-jooq-plugin (kotlin)

Im trying to use jooq with gradle (kotlin). Source: gradle-jooq-plugin I'm am trying it since yesterday, now i do not have any resources to look at. I assume i don't get it right, since i am new to kotlin. But the examples did not work for me…
anjey
  • 93
  • 2
  • 11
2
votes
1 answer

How to combine two components using allOf in openapi yaml specification?

I try to generate java model classes from yaml specification using openapi-generator-maven-plugin:3.3.4. In one component I have allOf parameter trying to combine two different components by their refs. It goes like: Flight: allOf: -…
Besanouno
  • 33
  • 1
  • 5
2
votes
1 answer

Can graphql codegen automatically generate types for hooks' result data field?

I'm using graphql codegen hooks, which results are of the type: ApolloReactCommon.QueryResult, meaning it's an object that has data, loading and error fields. Most generally, I'll use the data in other components, where I need to define its type. I…
Tbaut
  • 306
  • 1
  • 7
2
votes
1 answer

Why are the "Paste JSON As Classes" and "Paste XML As Classes" commands disabled (grayed out) in Visual Studio?

I'm using Visual Studio 2017 15.9.0 Preview 4.0. I'm trying to use the "Paste XML As Classes" command available under "Edit > Paste Special" but it's grayed out: I got the (incorrect) feeling that this command would allow me to pick a file that…
rory.ap
  • 34,009
  • 10
  • 83
  • 174
2
votes
1 answer

Using MapStruct SPI custom AccessorNamingStrategy with Gradle

I am trying to implement a custom accessor naming strategy like documented here: http://mapstruct.org/documentation/stable/reference/html/#using-spi However, I can't get it to work with Gradle. There only seems to be a usage example for…
chris
  • 2,541
  • 1
  • 23
  • 40
2
votes
0 answers

How to integrate code-gen into a python package

I'm just now branching out into python packaging after using proprietary packaging methods for over a decade. I have a data file that is used to generate python code that is a part of my package that runs on Windows and Linux. I'm trying to…
Ed Page
  • 46
  • 2
2
votes
1 answer

JOOQ generated classes have schema defaulted to PUBLIC

This is a follow up question to this SO Question. I am using jooq codegen for auto generation of jooq classes from jpa entities. I am planning to use jooq as a SQL query builder and execute the actual queries with JPA EntityManager. But jooq is…
yaswanth
  • 2,349
  • 1
  • 23
  • 33
2
votes
1 answer

How do I restrict the generated code to tables in a database?

I am currently evaluating jooq. I am very new to it. I want to use jooq to access a SQL Server 2008 R2 database. When I generate the classes, the codegen tool goes and generates code for objects from all the databases on that server which is not…
boggy
  • 3,674
  • 3
  • 33
  • 56