Skip to content

Notes on the generator #28

@jonschoning

Description

@jonschoning

Several months ago, the folks at SmartBear (who own the repo for swagger-codegen [1] ) decided to do a re-write while moving from supporting the 2.0 openapi spec to 3.0.

However, in this process, they also changed the templating language from mustache to handlebars - invalidating existing languages - essentially existing work for each language would have to be re-built from scratch.

This caused a split in which the primary open-source contributors left, and forked swagger-codegen into a new repo "openapi-generator" [1] - which focuses on an incremental path to support of the openapi 3.0 spec, and not moving to handlebars templates or throwing out existing work on generators, and focusing more on backwards-compatibility.

I've included the haskell-http-client generator in the new openapi-generator, which has been merging my pull requests promptly, and in which i also have commit rights.

I've tried submitting PR's to swagger-codegen, but they have not been merging any PR's lately.

the upshot:

  1. Continue to use swagger-codegen. For now, the breaking changes are only on the 3.0.0 branch and master still includes the old haskell-http-client. If they switch master to 3.0.0 at some point haskell-http-client probably won't be available there anymore. You could continue to target an existing commit for the generator, but probably not be able to get any changes made to the haskell-http-client generator very easily. So, If the current version of the generator is serving your needs adequately, then all is good.

  2. Switch to openapi-generator. It's pretty much backwards compatible, but some cli arguments may be depricated. Also i'm not sure if the build process here supports targeting a different repo than swagger-codegen. If more features/changes in the generator are desired though, it would be much easier to make them in openapi-generator.

As of today, I haven't made extensive changes to the haskell-http-client generator, so there is not much difference in features from swagger-codegen vs. openapi-generator.

Question: Are there any ongoing/steady users of kubernetes-client/haskell ?

[1] https://github.com/swagger-api/swagger-codegen
[2] https://github.com/OpenAPITools/openapi-generator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions