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
0
votes
1 answer

How to convert Array of Object into Object in React

GetQuery sample data from getquery graphql generated api { id: '', name: '', regions: [ { id: '', name: '', districts: [ { id: '', name: '', locations: [{ id:…
0
votes
1 answer

Unable to generate classes for swagger

I am using the following config to generate swagger: java: 6 swagger-codegen-maven-plugin: 2.1.3 io.swagger: 1.5.0 com.fasterxml.jackson.core: 2.7.0 When i run maven install(from intellij), get this error: [ERROR] Failed to execute goal…
user1318369
  • 715
  • 5
  • 15
  • 34
0
votes
1 answer

OpenApi Codegen "Failed to get the schema name:"

i use OpenAPI Generator to generate client on based my swagger.yaml i have this part of code: ... responses: '400': $ref: "#/errors/400" ... errors: '400': description: invalid request content: …
mike
  • 19
  • 2
  • 5
0
votes
1 answer

Typescript extend "a type nested in a type"

I am have the following type: type IQueryResolvers = { me?: ... profile?: ... } the problem is, I have one controller function for each key of type IQueryResolvers, for example: const meController =…
0
votes
1 answer

JiBx error when inlcuding other schema

Here is the schema I am using for JiBx to codegen and bind.
narayanan
  • 515
  • 2
  • 10
  • 19
0
votes
1 answer

Why apollo client:codegen is not generate types?

im trying to get the types defined in my Apollo server by first, downloading the schema effectively: apollo client:download-schema src/code/queries/schemas/schema.json --endpoint http://localhost:4000/ that command generates the following .json,…
Emanuel Silva
  • 53
  • 1
  • 6
0
votes
0 answers

Programmatic access to "peek" code in Visual Studio

In Visual Studio, I can right-click a method from a compiled assembly and pick "Peek Definition" to see a list of method definitions, properties, enums, etc from that class. This definition has a [from metadata] qualification, indicating that this…
superstator
  • 3,005
  • 1
  • 33
  • 43
0
votes
1 answer

How to dynamically generate functions in Lua?

If I have a table {field1=1,field2=0} (0: ascending order, 1: descending order) I want to get a function: function(x,y) return x.field1 < y.field1 --there 0:'<',1:'>=' end field1 in the table and the sorting rule can be injected in the…
haskeller
  • 141
  • 4
0
votes
1 answer

How do I make anonymous class implementing an interface with std only?

Here is a sample Scala code that I'm trying to rewrite in C#: trait FuncHolder[T, TResult] { def Value: Function1[T, TResult] } object FuncHolder { def GetFunctionHolder[T, TResult](func: Function1[T, TResult]) = new FuncHolder[T, TResult] { …
Alex Zhukovskiy
  • 9,565
  • 11
  • 75
  • 151
0
votes
1 answer

Task in Android Studio project is failing with getaddrinfo ENOTFOUND 8888 8888:80 error

My project is failing because one of the tasks in the project is failing. I don't think its the code since the project is successfully building in another machine. I have tried the following: 1> making sure there is no proxy setting. Its currently…
JayHawk
  • 275
  • 1
  • 5
  • 15
0
votes
0 answers

How to prevent nested models with OpenAPI Codegen?

Input JSON I have huge JSON. This is an excerpt of it. { "base.get.v1.Input": { "properties": { "request": { "$ref": "#/components/schemas/base.get.v1.Input.Request" }, "id": { "maxLength": 128, …
user8303828
0
votes
2 answers

Pasting data table from web browser as Javascript array

I've seen some time ago a video where a guy just selected whole text table in an internet browser, pasted it in the editor an than run some plugin/tool that automatically converted the text to actual objects array. I'm not sure what editor he was…
0
votes
1 answer

aspnetcore is missing from Codegen Options in SwaggerHub

for me, aspnetcore is missing from Codegen Options in SwaggerHub. Am I making some simple mistake? I just want to generate server stub from existing openapi file. thank you.
Dzagana
  • 73
  • 1
  • 1
  • 7
0
votes
1 answer

What is a good StringTemplate plugin for Eclipse, so i can do cod gen?

I'm working on a eclipse-based model-based tool. I am not using UML/SysML but i created my own DSML (= component architecture, whereby components have a behavior, modeled using state automatons). What I want to do now is to be able generate code…
JennyDong
  • 11
  • 2