question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Standardize maps and extensions

See original GitHub issue

Before 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:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
webroncommented, May 10, 2017

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:

  • Server Variables Object Map[{name}, Server Variable Object] No extensions
  • Encoding Object Map[{property}, Encoding Property Object] No extensions Change Encoding Property Object to Encoding Object *
  • Callbacks Object Map[string, Callback Object | Reference Object] No extensions *
  • Headers Object Map[string, Header Object | Reference Object] No extensions
  • Links Object Map[string, Link Object | Reference Object] No extensions
  • Link Parameters Object Map[string, Any | {expression}] No extensions
  • Scopes Object Map[string, string] No extensions *
  • Security Requirement Object Map[string, [string]] No extensions

Unknown:

  • Paths Object Map[/{path}, Path Item Object] Extensions allowed Reasoning: this is a special object in terms of interpretation.
  • Content Object Map[{mediaType}, Media Type Object] No extensions Reasoning: we just introduces this object…

Recommended to keep as-is:

  • Responses Object Map[‘default’|1-5, Response Object | Reference Object] Extensions allowed Reasoning: this one is a bit complicated, with the allowed keys, and the requirement that one key at least must be provided.
  • Callback Object Map[{expression}, Path Item Object] Extensions allowed Reasoning: the key is too complex to describe in a property, and it might take away too much of the impact of callbacks.

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.

0reactions
webroncommented, Jun 1, 2017

Resolved by #1115.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Standardize Field (Data Management)—ArcGIS Pro
ArcGIS geoprocessing tool that standardizes values in fields by converting them to values that follow a specified scale.
Read more >
Use Cases and Requirements for Standardizing Web Maps
This report outlines the use cases and requirements for standardizing modern Web maps, in a way that works for map content authors, ...
Read more >
Overview of key file formats and file extensions in ArcGIS
Commonly Encountered File Types/Extensions in ArcGIS ... .mxt Map templates make it easy to reuse or standardize a layout, or even the same...
Read more >
ArcGIS Extensions - Esri
Freely Share Your Maps and Data with a Wide Range of Users ... Esri® Production Mapping*. Standardize and Optimize Your GIS Data and...
Read more >
Normalizing and Classifying Choropleth Maps - Esri Videos
Ken Field and John Nelson explain some best practices for thematic mapping. Specifically, they show how how and why to normalize a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found