Subject: [httpapi] New standards for OAS, vocabularies and enumerations

From: Roberto Polli <[email-masked]>
Date: Thu, 16 Dec 2021 16:52:29 +0100

Dear all,

I'm trying to ease the usability of vocabularies/schemas via OAS/JsonSchema
in a standard way.

Imagine the following schema

```
Country:
  type: string
  description: |-
    An alpha-3 country code between the ones available at
    https://countries.example/codes/{country_id}.
    Available codes can be retrieved from
    https://countries.example/code-ids
  enum:
    $ref: https://countries.example/code-ids

```

Currently:

- enum in OAS do not support $ref's
- it could be useful to support some kind of transformations
  such as jsonpath expressions

```
...
   enum:
     $ref: https://countries.example/codes#$.items[*].key
```

This could require some spec tweak, including:

- https://tools.ietf.org/id/draft-goessner-dispatch-jsonpath-00.html

Is anyone interested in the thread?
How do you integrate registries/vocabularies with json-schemas?

Have a nice day,
R.