Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:00
    kuFEAR synchronize #5750
  • 15:59
    kuFEAR synchronize #5750
  • 15:58

    wing328 on gh-pages

    Deploy website version based on… (compare)

  • 15:52
    DevASG commented #5708
  • 15:42
    LiamMartens opened #5762
  • 15:39
    grexe edited #5761
  • 15:39
    grexe labeled #5761
  • 15:39
    grexe opened #5761
  • 15:38
    grokify edited #5737
  • 15:37
    grokify edited #5737
  • 15:32
    Bouillie synchronize #5758
  • 15:20

    wing328 on master

    [Erlang-Server] security defini… (compare)

  • 15:20
    wing328 closed #5751
  • 15:20
    wing328 milestoned #5751
  • 15:20
    wing328 labeled #5751
  • 15:20
    wing328 labeled #5751
  • 15:16
    grexe opened #5760
  • 15:16
    grexe labeled #5760
  • 15:15
    micw commented #5759
  • 15:14
    micw commented #5759
Fjolnir-Dvorak
@Fjolnir-Dvorak
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 ;)
Guschtel
@Guschtel
@renepardon activate swagger in your services -> convert the ouput of the swagger definition to openapi
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?