Giter Club home page Giter Club logo

Comments (6)

RobinTail avatar RobinTail commented on May 24, 2024

CC @pjmolina ?

from openapi3-ts.

pjmolina avatar pjmolina commented on May 24, 2024

Hi. Sorry for the delay @RobinTail
Yes. The default export points to v. 3.1.
But when needed yo consume v 3.0 you can import from:

import * from "openapi3-ts/dist/cjs/model/openapi30"; 
import * from "openapi3-ts/dist/cjs/dsl/openapi-builder30";

Yes, agreed. We should add it to the Readme also.

from openapi3-ts.

pjmolina avatar pjmolina commented on May 24, 2024

Docs updated. Published as v. 4.0.1.
Please it checkout @RobinTail to see if now is clearer.
Thanks!

from openapi3-ts.

RobinTail avatar RobinTail commented on May 24, 2024

But when needed yo consume v 3.0 you can import from:

import * from "openapi3-ts/dist/cjs/model/openapi30"; 
import * from "openapi3-ts/dist/cjs/dsl/openapi-builder30";

I see. Unfortunately, this does not work quite well when using such imports for the further compilations both to CJS and ESM.

Would it be possible, to have re-export everything from the root index file under different names?

Thus, I wouldn't need to specify /cjs and /esm explicitly.
Something like import { OpenAPIBuilder30 } from "openapi3-ts";.

Or maybe using namespaces?

Something like namespace v30 {} (maybe) for both model and dsl.

from openapi3-ts.

pjmolina avatar pjmolina commented on May 24, 2024

Yes, I think we can do it, as we can just break compatibility.
A rename for the v. 3.0 should work. Let's try it.

See @RobinTail if this works for you: #103

from openapi3-ts.

RobinTail avatar RobinTail commented on May 24, 2024

Thank you, @pjmolina

from openapi3-ts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.