Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 04:37

    wing328 on gh-pages

    Deploy website version based on… (compare)

  • 03:55

    wing328 on master

    [Java] Fix Potential Flaky Test… (compare)

  • 03:55
    wing328 closed #10485
  • 03:55
    wing328 commented #10485
  • 03:47

    wing328 on r-decimal

    (compare)

  • 03:47

    wing328 on master

    add decimal support to R client… (compare)

  • 03:47
    wing328 closed #10487
  • 03:47
    wing328 closed #10375
  • 03:47
    wing328 milestoned #10483
  • 03:47
    wing328 labeled #10483
  • 03:47
    wing328 labeled #10483
  • 03:47

    wing328 on master

    update to handlebars.java 4.2.1… (compare)

  • 03:47
    wing328 closed #10483
  • 03:46
    wing328 commented #10483
  • 03:44
    wing328 milestoned #10487
  • 03:44
    wing328 labeled #10487
  • 03:44
    wing328 labeled #10487
  • 03:44
    wing328 opened #10487
  • 03:42

    wing328 on r-decimal

    add decimal support to R client… (compare)

  • 03:38

    wing328 on powershell-decimal

    (compare)

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.
Paul DeMarco
@pauldemarco
yikes, so do i use swagger-codegen or openapi codegen?
I'm looking to add a Dart generator using auto_data
William Cheng
@wing328
@pauldemarco please join the discussion in OpenAPITools/openapi-generator#3785
@/all 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.
André Dietrich
@an_dietrich_twitter
hi folks, i just started to work with the openapi-generator ... how can i generate code with securitySchemes, I mean, how can I add the key from the commandline?
William Cheng
@wing328
Varg Industries
@vargind_twitter
Is there any way to configure the generator with a maximum line length so that it doesn't generate really long lines?
William Cheng
@wing328
Dominik
@dominik0711
Hi. We still use python2 in our legacy environment. Is it possible to generate openAPI code through openapi-generator-cli for python version 2.7?
William Cheng
@wing328
Christoph, René Pardon
@renepardon
is there a way to generate an open api spec from a rest api just by calling all the endpoints through a script? ;D
problem is: its a huge api and documenting all endpoints manually would consume a lot of time
Stefan Dresselhaus
@Drezil
@renepardon Some APIs are self-documenting via https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS ;)