openvibers/openvibe.contracts Commits
Contracts 0.180.0: Sources api endpoints take path selectors, where patterns and max_bytes (OVHcloud's catalog) (#140)
OP OpenVibers committed 29 days ago · tag v0.180 · 0 files, +0 −0
**Contracts 0.180.0: Sources api endpoints can read OVHcloud-style catalogs. Path selectors, `where` patterns and a per-endpoint `max_bytes`.**
**Why:** OpenVibe.Host compares only Linode and Amazon Lightsail. Vultr's API host disallows every path in robots.txt, and the other keyless provider APIs we checked (Scaleway, Cherry) do the same; UpCloud, Latitude and Hivelocity need keys. OVHcloud's public order catalog is marked `noAuthentication` in OVHcloud's own API schema and publishes no robots rules. Its layout is what the api adapter could not read:
- plans and their hardware are separate arrays joined by product name;
- every price variant sits in one array;
- the current plans have to be picked from about 240 plan codes by their shape;
- the file is about 12 MB, over the deployment's 5 MB cap.
**`sources.source@1` and `sources.source-write-request@1` (additive, compatible):**
- `where` values may be `{ "pattern": "…" }` (at most 200 characters, no other keys), alongside a scalar or an array of scalars.
- `max_bytes`: an integer from 1024 to 33554432.
- The `extra` and `where` descriptions document `key[field=value,…]` selectors, with values that are literal text or `$rec.<path>`. Path strings were already unconstrained by the schema.
**Fixtures:**
- valid `api-select-pattern`: OVHcloud-shaped, with all three features.
- invalid `where-pattern-extra-key`: a pattern object with `flags`.
- invalid `max-bytes-over-cap`: 64 MiB.
**Checks:** the suite passes (20,113 checks). `compat.js v0.179.0` finds no breaking changes.
The Sources implementation and the `ovhcloud-vps` seed follow in OpenVibe.Sources, pinned to this release.
This commit has no diff to show.