Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:26
    wing328 commented #9489
  • 15:22

    wing328 on master

    Add support for Boolean in R cl… (compare)

  • 15:22
    wing328 closed #9469
  • 15:22
    wing328 commented #9469
  • 15:00
    wing328 milestoned #9490
  • 15:00
    wing328 labeled #9490
  • 15:00
    wing328 labeled #9490
  • 15:00
    wing328 labeled #9490
  • 15:00
    wing328 labeled #9490
  • 15:00
    wing328 edited #9490
  • 14:59

    wing328 on master

    reduce travis ci job runtime (#… (compare)

  • 14:59
    wing328 closed #9491
  • 14:59
    wing328 commented #9491
  • 14:58
    wing328 labeled #9491
  • 14:58
    wing328 opened #9491
  • 14:56
    wing328 opened #9490
  • 14:53

    wing328 on qt5-rename

    rename qt5 to qt rename, update (compare)

  • 13:54

    wing328 on fix_travis

    reduce travis ci job runtime (compare)

  • 13:37
    AndersSpringborg edited #9489
  • 13:34
    mkakbas synchronize #9489
William Cheng
@wing328
nbenjamin
@nbenjamin

Hi All,

I have a question on OpenAPI generator for spring, currently i have base class and number of subclass
so would like generate the code something like this

public ResponseEntity<T extnds Base> methodName()

When i used oneOf its generates
public ResponseEntity<Object> methodName()

Is there anyway to generate public ResponseEntity<T extnds Base> methodName() in this format

Fjolnir-Dvorak
@Fjolnir-Dvorak

Please join our Slack channel via https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM and we'll only answer questions in the Slack channels moving forward.

@nbenjamin This gitter is no longer active and maintained. It's only here for the purpose of redirecting people to slack

nbenjamin
@nbenjamin
Thank you @Fjolnir-Dvorak
Geoff Brown
@gbrown-ce

So I'm running into some issues with an OpenAPI 3 spec and the CSharp generator. If I have query parameters that are optional, they always generate to non-optional on the api client:

ie.{ "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64" } }

comes out as long categoryId = default(long)

I tried messing with the template, but I can't figure out how to make it distinguish the difference. I'm starting to think that the actual code is incorrect and the dataType here should be long? instead of long, which would make things work properly. Anyone know where I would look for that? Is there something else in the template I could be doing?

Stefan Dresselhaus
@Drezil

Please join our Slack channel via https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM and we'll only answer questions in the Slack channels moving forward.

@gbrown-ce This gitter is no longer active and maintained. It's only here for the purpose of redirecting people to slack

but to answer your question: try required: true/false to denote optional fields
(i don't use C#, but in Haskell you have to make everything required, otherwise it will always be optional)
Geoff Brown
@gbrown-ce
This is working the opposite way (everything is required). I think I might have found a way with the netcore generator. Thanks for the heads up about the slack!
Algorithman
@Algorithman
i have a kinda general question: the openapi-generator to c# is working, right? There are no breaking issues at the moment?
John Kida
@jkida
Im using openapi-generator for a java/spring project. Its currently generating the server stub with a query param of Map<String, Object> however i need it to generate as a MultiValueMap to support ?id=1&id=2.
What is the correct approach to make sure it generates the stub with the correct class to support this?
mplain
@mplain
hello there
i have an openapi specification split into multiple yaml and json files
swagger-parser-v3 can resolve all reference and combine it into a single model - in memory
now, can I somehow write that model into a new yaml file?
is there some tool that can be used to merge multiple openapi spec files into one?
1pinus
@1pinus
I just had a brief look into the code generator if it is feasible to integrate it into an API first development process. It does its job to generate a stub but I wonder if anybody integrated it into an automated build. My idea was to edit the yaml file and get the server generated, to a certain degree, e.g. controller level. Has anybody experience with such a setup. Currently it looks like a one shot generator.
Stefan Dresselhaus
@Drezil
@1pinus we use the haskell & python-generator for such things.
1pinus
@1pinus
@Drezil How do you merge the generated code with the already available? Copy files?
Stefan Dresselhaus
@Drezil
generated code is in a seperate git-submodule. Git pull then does the trick.
@1pinus
and you never need to merge as generated code never gets touched by hand
William Cheng
@wing328
monajit
@monajit
Is there a way to modify the generated Avro Schema ? Basically any data attribute defined with format: date-time should be tagged with a logical type
Philippe Soares
@psoares
Hi ! I'm trying to generate a java client from https://api.twitter.com/2/openapi.json, but the generator creates an interface with an invalid name "2Api.java". Is there a way to set a prefix to the interface name the same way we add prefixes to the model classes?
Jonas Jermann
@jjermann
hi, I have this issue: OpenAPITools/openapi-generator#2892
Is anyone familiar how I can force "separate" schema definitions for everything (which seems to be a temporary fix for the above bug)? I use swashbuckle for the opnapi.json generation.
Khairi Husseini
@khusseini
hey everyone. does anyone know how I implement the generated client for typescript-rxjs? I used the typescript generator first in my redux application, however since the models are declared as classes this didn't really work nicely together with the redux store. I never used rxjs and I cannot find any documentation on how to use the client.
ityulkanov
@ityulkanov
Hello everyone. I'm looking for tool that can generate api docs directly from source code, does anyone know if openapi-generator allows to do that?
I have springboot project that currently creates api.json file using swagger-core, but it requires to run the app first. I want to avoid that step
falk-stefan
@falk-stefan
Does anybody know how I can download binary data with a generated client? My problem is that the data is interpreted as JSON which is why the client crashes.
Also: I am using StreamingResponseBody (Spring Boot)
Rakesh Bairi
@rakeshtechguy_gitlab

We have been trying to achieve configuring Swagger on Aspnet Core Identity Server 4 Application, we have added Custom End points to ID4 refered from link.

Swagger Configuration:

Code added on Startup.cs > ConfigureServices(IServiceCollection services)

services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "Identity Server Application", Version = "v1" });
});
Code added on Startup.cs > Configure(IApplicationBuilder app)

  // Enable middleware to serve generated Swagger as a JSON endpoint.
    app.UseSwagger();
    // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
    // specifying the Swagger JSON endpoint.
    app.UseSwaggerUI(c =>
    {
        c.SwaggerEndpoint("/swagger/v1/swagger.json", "Identity Server Application");
    });

When i run application swagger/index.html only showing Custom Added End Points,its not showing Identity Server Endpoints like {connect/authorize,connect/token,connect/userinfo etc.}

Can any one please give me right direction to achieve above functionality.

swagger reponse coming in OpenApi format
Joseph Chambers
@imcodingideas
is there a option to generate a single instance because the openapi-generator to creates a new instance for each service.

an example:

const userApi = new UserApi(new Configuration({ baseOptions: {…} }), BASE_URL, axiosInstance);

Joseph Chambers
@imcodingideas
is there a way so I don't need to create a new instance for the UserApi, ReactionsApi, etc etc?
Joseph Chambers
@imcodingideas
I should say when I have multiple tags.
Ben Gill
@bendg25
Hey, we are using 5.0.0.SNAPSHOT, and seeing this behaviour on typescript-angular generator: Property 'toISOString' does not exist on type 'string'.
309         return this.httpClient.get<LoadHolidayResponse>(`${this.configuration.basePath}/rest/holidays/loadBetween/${encodeURIComponent(String(contextId))}/${encodeURIComponent(String(contextIdType))}/${encodeURIComponent(String(start.toISOString()))}/${encodeURIComponent(String(end.toISOString()))}`,
caused by @PathVariable("start") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start,
is anyone actively working on the typescript generator?
William Cheng
@wing328
Saskia Gennrich
@pektinasen
hey everyone. Would anyone see any problem with sorting all objects by key in the yaml spec. Would there be a case where the order of the key value pairs could be important?
For some background, we want to generate a client from an openapi document that is given to us, but our partner makes frequent additions and minor changes to it, and doesn't even preserve the order of the paths entries. Which makes diffing very complicated, which we have to do, because we have to tweak the document to even generate usable code.
prat
@pratyoosh
I am trying to find a way to generate only the model embedded in the OpenAPI YAML spec & not the API's altogether (language Java), except moving model into a separate yaml is there a way to do that ?
Thibault Duperron
@Zomzog
You can disable api and utils generation with "generateApis" and "generateSupportingFiles" parameters to false
prat
@pratyoosh
Thanks @Zomzog let me try...
prat
@pratyoosh
couldn't find generateApis in https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin has it been renamed to something else ?