Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:12
    SamuelLabrador edited #10429
  • 03:11
    SamuelLabrador edited #10429
  • 03:02
    SamuelLabrador edited #10429
  • 02:05
    SamuelLabrador edited #10429
  • 02:04
    SamuelLabrador edited #10429
  • 02:03
    SamuelLabrador labeled #10429
  • 02:03
    SamuelLabrador opened #10429
  • Sep 19 19:42
    spacether edited #10334
  • Sep 19 19:41
    spacether edited #10334
  • Sep 19 19:40
    spacether edited #10334
  • Sep 19 17:39

    jonschoning on haskell-http-client

    (compare)

  • Sep 19 16:32
    RomainPruvostMHH opened #10428
  • Sep 19 11:20
    davidtaing opened #10427
  • Sep 19 10:39
    zczhuohuo commented #10010
  • Sep 19 10:14
    chameleon82 synchronize #10426
  • Sep 19 10:12
    mpgirro commented #7014
  • Sep 19 09:27
    wing328 commented #10426
  • Sep 19 09:15
    poisonedvk commented #10404
  • Sep 19 09:06
    chameleon82 edited #10426
  • Sep 19 09:04
    chameleon82 synchronize #10426
Archimedes Trajano
@trajano
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?
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?