Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:45
    balazs-zsoldos commented #3449
  • 10:33
    thecrazzymouse synchronize #3730
  • 09:51
    daniel-sc edited #3738
  • 09:47
    wing328 commented #3722
  • 09:46

    wing328 on master

    comment out kotlin client tests (compare)

  • 09:45
    wing328 commented #3722
  • 09:39
    gualtierim commented #3721
  • 09:39
    jmini commented #3722
  • 09:39
    gualtierim commented #3721
  • 08:22
    daniel-sc commented #3738
  • 08:19
    siada commented #3721
  • 08:19
    auto-labeler[bot] commented #3738
  • 08:19
    auto-labeler[bot] labeled #3738
  • 08:19
    daniel-sc opened #3738
  • 07:19
    etherealjoy labeled #3663
  • 07:19
    etherealjoy labeled #3663
  • 07:19
    etherealjoy labeled #3663
  • 07:07
    etherealjoy commented #3663
  • 06:57
    bbdouglas commented #3729
  • 06:54
    bbdouglas commented #3735
Dennis Kliban
@dkliban
oops
wrong link
and i looked at the CodegenConfig interface. I see it has toVarName and toParamName methods
and i see where those are called later ... but i am not quite sure where you were thinking toDiscriminator would be called ... and would i need to implement a custom discriminator?
William Cheng
@wing328
Hi all, we've collected some feedback from the community and would like to announce we're switching the chatroom from Gitter.im to Slack. 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. We'll keep this Gitter chatroom for a few months and remove it when there's no activity. Thank you.
Fjolnir-Dvorak
@Fjolnir-Dvorak
My suggestion would be on that that we keep this gitter here as support chat. Slack seems very inappropriate for that (no one is using it and it requires authentication without GitHub). GitHub is widely used and accepted. I do have to agree with that that perhaps slack could be better for development?
The problem I have with moving to slack: I do not report any bugs if I have to login into any platform. If they want me to login into their system, they are not interested in getting bug reports so why should I bother helping them?
And sometimes I am reporting bugs via gitter. Writing bugreports is a science for itself sometimes. It's way to complicated for just reporting that something is wrong if I am not interested in fixing the issue myself
Jim Schubert
@jimschubert
The problem with Gitter is that notifications often don’t work. On both desktop and mobile, I frequently have to close the client in order to see new messages. This makes having a “conversation” pretty difficult. There’s also no support for threaded comments, and editing comments on mobile is not exactly functional. Gitter isn’t a main product focus of GitLab, and as such it’s been years and these bugs are still not fixed. Makes one wonder if unanswered messages are just dropped.
Colton Kopsa
@coljamkop
Is there a way to do selective generation from the CLI?
Fjolnir-Dvorak
@Fjolnir-Dvorak
There is a tool written in JavaScript, sadly. It's called openapi-extract. The generator itself is not selective in any way...
Colton Kopsa
@coljamkop
In general what is the best way to update generated clients? It looks like the maven plugin has some ability to be selective.
I'll take a look at openapi-extract in the mean time
Fjolnir-Dvorak
@Fjolnir-Dvorak
The best way to update the generated clients is to not edit them, delete them and regenerate them. Models which are no longer needed will not be deleted. Controllers which are not longer needed are not deleted. Are you only asking for one specific Java generator or for other languages, too?
Colton Kopsa
@coljamkop
the java11 client from the generator
I don't have many edits, just updating the pom on a few things to get it to actually build, and adding a Jenkinsfile and such
I just didn't know if I was doing things incorrectly by basically just doing the delete and regenerate approach
Fjolnir-Dvorak
@Fjolnir-Dvorak
It should work. The generator is generating the whole project and does not rename anything if you did not update the generator in the meantime, so everything should work
Colton Kopsa
@coljamkop
Okay, I'll give it another shot
Colton Kopsa
@coljamkop
Yep, looks like it worked. Out of curiosity though, there are stubs for unit tests in the client code and on the server side of things, there's going to be quite a bit of implementation that goes into hooking the server up to databases and stuff. When regenerating that code, do the tests and implementation code get wiped out every time? That was my experience, but I could have been doing something wrong.
Fjolnir-Dvorak
@Fjolnir-Dvorak
It would be easier to not touch any file which was generated. If you have to change those either you utilize git diff every single time or you put those in .openapiignore so that those will net be regenerated, and also not longer extended, corrected, etc.
For python I wrote myself a full wrapper and include the wrapper as a new pythonpath so it does not destroy any of my code. Since I had to touch the controller which was autowired (and got destroyed every time I made an api update) I created a monkeypatch which takes a manually created implementation class, patches all implemented functions into the generated code and repaires every single other endpoint to 501 "Not Implemented" and removed the garbage 200 "Do some magic". One of the only servers I know about which just works without editing generated code and destroying all dreams about maintainability is the Haskell generator. The clients should be a lot less problematic though...
Colton Kopsa
@coljamkop
Heheh, that's good to know. Yeah, my first question when generating a server was, "How am I supposed to maintain this?" I'm glad to know it's not just me.
Yeah, the client seems to be working well now. Thanks for the help! I really appreciate it.
Sai Giridhar P
@saigiridhar21
Is dotnet-netcore under active development or is it ready to use ?
Archimedes Trajano
@trajano
Hi I was wondering if there is a way to make the generator work with empty keys?
Here's an example:
  examples:
    LocalizedString:
      description: Sample with multiple languages
      value:
        "": "default locale"
        "en": "English"
        "en-CA": "Canadian English"
        "en-US": "US English"
        "zh": "Chinese"
        "zh-CN": "China Chinese (Simplified)"
Here's the schema block
```
LocalizedString:
  description: |
    An object containing all the translations for a given object.  Each key represents an
    [IETF BCP 47](https://tools.ietf.org/html/bcp47) language tag.
  type: object
  title: Localized String
  properties:
    "":
      description: A blank key represents the string used as the default when a more specialized version is not available.
      type: string
  additionalProperties:
    x-additionalPropertiesName: language-tag
    description: |
      The key represents the [IETF BCP 47](https://tools.ietf.org/html/bcp47) language tag for clients to determine
       what string to display.
    type: string
  example:
    "": "default locale"
    "en": "English"
    "en-CA": "Canadian English"
    "en-US": "US English"
    "zh": "Chinese"
    "zh-CN": "China Chinese (Simplified)"
Gordon Cooke
@jwgcooke
I apologize if this has been asked before or if this is not the right forum for this but is there any plan for (or already existing that I have not found) an sbt plugin?
bmouland
@bmouland

Is there a rule stating a path parameter name cannot start with an uppercase letter? I'm curious as to why if I define such a parameter, the generated code changes this first letter to lower case.

For example, here's the json file portion of the post:

'/FuelCosts/{ICAO}':
post:
description: Update information about Fuel Costs with Query on Database
tags:

    - FuelCosts
  summary: Update Fuel Cost on DB with Query of ICAO
  operationId: UpdateFuelCostQueryIcao
  parameters:
    - name: ICAO
      in: path
      description: Look for Station Code
      required: true
      explode: true
      schema:
        type: string
        minLength: 1
        maxLength: 4

However, the resulting generated Api.cpp file results in the following:

void FuelCostsApi::update_fuel_cost_query_icao_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
// Getting the path params
auto iCAO = request.param(":iCAO").as<std::string>();

Is this a bug in the generator? Or is this expected for some reason?

Dennis Kliban
@dkliban
are you passing in --strict-spec=false ?
bmouland
@bmouland
no
Dennis Kliban
@dkliban
i use that option so that the generators that i use don't try to change the parameter names. but it still does change them in some cases where the language has requirements
bmouland
@bmouland
Is there such a requirement? I am just learning this and could not find any documentation stating anything about this
Dennis Kliban
@dkliban
@bmouland - the documentation is a bit sparse on this
William Cheng
@wing328
Please ask the questions in the Slack workspace instead: https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM as this chatroom is scheduled to be removed later this year.
Nate Bross
@fuzzzerd
I'm struggling to find documentation on how to use my own template for openapi generator. I want to make some local modifications to the typescript-fetch client that wouldn't be appropriate for everyone so don't belong as a PR to the main repo. I'd like to keep my own locally. Is that possible?
Jérémie Bresson
@jmini
Yes
If you are only modifying the templates working with -tto specify a directory where templates files are (or its equivalent in maven/gradle plugin) can be sufficent
Jérémie Bresson
@jmini
If this is something you would like to distribute, you can embed your modified templates into a jar that you add to OpenAPI-Generator when using it.
Nate Bross
@fuzzzerd
@jmini thank you. I found the .jar thing and was confused as to why I had to do all those steps. I'll review the -t option.
William Cheng
@wing328
@fuzzzerd Please ask the questions in the Slack workspace instead: https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM as this chatroom is scheduled to be removed later this year.