Standardize maps and extensions
See original GitHub issueBefore releasing 3.0.0-RC0 we introduced a new type construct to the spec in the Components Object. For examples, schemas has the type of Map[string, Schema Object].
This was done to avoid creating a Schemas Object, Responses Object and so on, which would simply be those maps. I’d recommend we drop existing map objects and use the same construct for those, including Server Variables Object, Scopes Object and so on.
The exception would be the Paths Object as it imposes a pattern to the named field.
Following that, suggest we drop support for extensions in maps (except Paths Object) - there’s no way to tell the difference between a name in the map and an extension. If someone wants to name a server variable x-y-z, it would be unclear whether it’s an extension or a name of a variable.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:12 (12 by maintainers)

Top Related StackOverflow Question
The following is a list of potential objects to be converted to maps. There are three types - recommended, unknown, not-recommended. Each object also specifies whether extensions are allowed or not. In some cases (will try to note), the decision to allow extensions was flipped because it doesn’t make sense otherwise.
Recommended to be dropped:
Unknown:
Recommended to keep as-is:
Some of these may prove challenging to remove because they offer additional text to explain the general concept (for example: Links, Callbacks). In such case, we might create top-level topics to explain those better, and reference to the topics from the relevant properties.
Once we’re in agreement on the changes, I’ll write up the PR - it’s going to be a big one.
Resolved by #1115.