Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We probably need stableSchemas in npm package #459

Open
derberg opened this issue Nov 30, 2023 · 1 comment
Open

We probably need stableSchemas in npm package #459

derberg opened this issue Nov 30, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@derberg
Copy link
Member

derberg commented Nov 30, 2023

most of the context is in: #421 (comment)

now we have

module.exports = {
    'schemas': {
        '2.0.0': require('./schemas/2.0.0.json'),
        '2.1.0': require('./schemas/2.1.0.json'),
        '2.2.0': require('./schemas/2.2.0.json'),
        '2.3.0': require('./schemas/2.3.0.json'),
        '2.4.0': require('./schemas/2.4.0.json'),
        '2.5.0': require('./schemas/2.5.0.json'),
        '2.6.0': require('./schemas/2.6.0.json'),
        '3.0.0': require('./schemas/2.6.0.json')
    },
    'schemasWithoutId': {
        '2.0.0': require('./schemas/2.0.0-without-$id.json'),
        '2.1.0': require('./schemas/2.1.0-without-$id.json'),
        '2.2.0': require('./schemas/2.2.0-without-$id.json'),
        '2.3.0': require('./schemas/2.3.0-without-$id.json'),
        '2.4.0': require('./schemas/2.4.0-without-$id.json'),
        '2.5.0': require('./schemas/2.5.0-without-$id.json'),
        '2.6.0': require('./schemas/2.6.0-without-$id.json'),
        '3.0.0': require('./schemas/2.6.0-without-$id.json'),
    }
};

with new release strategy that comes with v6 of this repo, new releases of spec like for example 3.1.0 will look like below - even if not yet officially released and in pre release state

module.exports = {
    'schemas': {
        '2.0.0': require('./schemas/2.0.0.json'),
        '2.1.0': require('./schemas/2.1.0.json'),
        '2.2.0': require('./schemas/2.2.0.json'),
        '2.3.0': require('./schemas/2.3.0.json'),
        '2.4.0': require('./schemas/2.4.0.json'),
        '2.5.0': require('./schemas/2.5.0.json'),
        '2.6.0': require('./schemas/2.6.0.json'),
        '3.0.0': require('./schemas/3.0.0.json'),
        '3.1.0': require('./schemas/3.1.0.json')
    },
    'schemasWithoutId': {
        '2.0.0': require('./schemas/2.0.0-without-$id.json'),
        '2.1.0': require('./schemas/2.1.0-without-$id.json'),
        '2.2.0': require('./schemas/2.2.0-without-$id.json'),
        '2.3.0': require('./schemas/2.3.0-without-$id.json'),
        '2.4.0': require('./schemas/2.4.0-without-$id.json'),
        '2.5.0': require('./schemas/2.5.0-without-$id.json'),
        '2.6.0': require('./schemas/2.6.0-without-$id.json'),
        '3.0.0': require('./schemas/3.0.0-without-$id.json'),
        '3.1.0': require('./schemas/3.1.0-without-$id.json'),
    }
};

This means that developers will need to accept all they get with schemas and accept possible breaking changes in unstable schemas, or take schemas in a way that they "manually" decide that only schemas prior some specific release are used by them

so people do not have to decide on ☝🏼 how to figure out which schemas are stable or not, we can introduce new object stableSchemas where taking above example, 3.1.0 would not be included until the official release of AsyncAPI 3.1

@derberg derberg added the enhancement New feature or request label Nov 30, 2023
@smoya smoya added the good first issue Good for newcomers label Jan 10, 2024
@aayushRedHat
Copy link

I am on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants