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

Validate sizes in consumable-htb-validator.js #6

Open
ix-certification opened this issue Jan 2, 2019 · 1 comment
Open

Validate sizes in consumable-htb-validator.js #6

ix-certification opened this issue Jan 2, 2019 · 1 comment

Comments

@ix-certification
Copy link
Contributor

size: {
type: 'array',
exactLength: 2,
items: {
type: 'number'
}
}

Use a sizes property instead of size. Even adapters that map one size to each slot use a sizes array in their config. This creates a standard interface for interacting with sizes within an adapter.

Replace the size property with sizes. Here's an example of what the sizes validation should look like:

sizes: {
    type: 'array',
    minLength: 1,
    items: {
        type: 'array',
        exactLength: 2,
        items:

{             type: 'integer'         }
    }
}

You can update this example so that the sizes property can only contain one inner size array, but this step isn't required. Our wrapper configuration tool will ensure your adapter is passed an appropriate number of size values based on the responses provided in DOCUMENTATION.md.

@djcsdy
Copy link
Contributor

djcsdy commented Jan 23, 2019

This was fixed in #7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants