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
0 answers

Distinguish between variables and constant in sympy symbolic expression

I am taking from user a symbolic expression as input and then differentiating it wrt to variables and then making a matrix consisting of the expression and differentiated expression. Then passed this through codegen to generate a c file. But I want…
MmmmK
  • 1
0
votes
1 answer

How to use the JWT standard in MongoAtlas GraphQL API

I'm trying to configure my codegen.yml file to interact with my GraphQL API on the MongoDB Atlas. But when I use Authorization: "eVaziLp8LgiFJivRQDgoLsjqbqm8KH5W2ykd4GD1hhR4FQ4DbE2I4wtEtM21hmpv", I receive the error expected Authorization header…
JPGCDC
  • 1
  • 1
0
votes
0 answers

How can i use react query and codegen generated functions in getServerSideProps in Next js?

I have already used Apolloclient with Codegen in Next js. To fetch data in server side, I used this code. const { data }: { data: FilterDataQuery } = await client(req).query({ query: FilterDataDocument, variables: {…
0
votes
1 answer

How to fetch schema from graphQL API endpoint

I need to fetch a schema from graphQL API endpoint. So the result must be a string like: type User { id: ID! name: String! } type Home { user: User! address: String country: String! } type Query { MyUsers: User! …
podeig
  • 2,597
  • 8
  • 36
  • 60
0
votes
0 answers

mex file generation failed

i'm trying to generate mex file for my project. I'm always getting the following error and i don't understand it well and also how to fix it: [11/11] /usr/bin/xcrun -sdk macosx12.1 clang build/maci64/simulation.o build/maci64/simulation_test_data.o…
0
votes
0 answers

openApi - yaml - how to create dictionary with keys that can be random and value as objects

I have a React app that save a dictionary and each key is an shortId and the value is an object. look like that { 'abcd1234':{ip:'1.1.1.1', c_type: 1}, '9876fedc':{ip:'2.2.2.2', c_type: 2}, } I tried to build objects in openApi yaml for the…
0
votes
0 answers

Failed to compile in React Typescript with graphql-typed-document-node

I'm trying out GraphQL codegen + graphql-typed-document-node. The examples provided by the library works (check out github link). However, when I apply it to my React app, it failed to compile. I have generated the types from backend schema and…
0
votes
1 answer

matlab generate c code with get column values error

i have meet a problem when using coder to generate C coder. matlab function contains a sentences like function [ B ] = fn1( A ) a = A(:,2); B = a+1; end A is input parameter, 4x2 matrix. i got c code: void fn1(const float A[8], float…
smdbh
  • 71
  • 3
0
votes
2 answers

why does the program need to check API header "Accept"

I am using swagger codegen to generate the controller for me. And there is a if statement there but it seems to me it is not necessary. Thank you. String accept = request.getHeader("Accept"); if (accept != null &&…
timo
  • 103
  • 2
  • 12
0
votes
2 answers

No webpage was found for the web address: http://localhost:8080/ in Spring generated by codegen with swagger

I am learning swagger using the example pet store in the swagger editor: https://editor.swagger.io/ The code for spring is generated and I does not change anything. However, everytime I run it on http://localhost:8080, it gives the error…
Www
  • 53
  • 8
0
votes
1 answer

Any possible ways to add a java code to existing java file programatically?

I have an interface and class file auto-generated using a custom maven plugin I created. The plugin will read the necessary data from a JSON file and create me a Java files using Jenesis4Java (Mojo code provided below). REQUIREMENT - i have to…
0
votes
1 answer

mov -0x10(%rbp), %r10 does not set %r10 to correct value?

I am writing a codegen problem, in which the output is x86/64 assembly code file. I have the following output seqeunce mov -0x8(%rbp), %r10 // r10 = 0 at the moment mov $0xa, %r11 // r11 = 10 cmp %r11, %r10 setg -0x10(%rbp) …
JinLing
  • 9
  • 6
0
votes
1 answer

How to run C code after automatic C code generation with Matlab?

I wrote a script in MATLAB and I am trying to generate C code. I have not used C over the years so I am a little bit confused rn. I am using the MATLAB coder to generate C code automatically. This worked perfectly and now I am trying to open the C…
Adam
  • 1
  • 2
0
votes
1 answer

How to generate model class for object with additionalProperties using OpenAPI code generator

I am using additionalPropertes in my OpenAPI definition to refer a map object. The part of my OAS is given below: Configuration: title: Configuration Info type: object additionalProperties: type: string description: The config…
Vithursa Mahendrarajah
  • 1,194
  • 2
  • 15
  • 28
0
votes
0 answers

Apollo client codegen configuration?

Are there some sort of options you can configure for Apollo Client Codegen beyond the basic limited options here? Specifically I am trying to: Remove top level __generated__ folder Format after generation Change filename casing The command I am…
mrseanbaines
  • 823
  • 2
  • 12
  • 25