Skip to content

Discuss requirement key format #44

Closed

Description

@jfsiii

At some point, the format for expressing min & max versions in the package API response changed from min & max to version.min & version.max

https://github.com/elastic/integrations-registry/blob/a9d1878eb8a586cc6039688bca564f9b1d842bd9/docs/api/package.json#L6-L10

Was this intentional? If so, is there a technical reason or was it a stylistic one?

I don't think there's a technical issue on the Integrations Manager side, but "version.min" isn't very Javascript-y or common the the APIs I personally consume.

Activity

  1. ruflin commented on Aug 12, 2019

    @ruflin
    Contributor

    If I remember correctly, it was a stylistic one. If it is version: { min: 7.0.0 } that would work better?

  2. jfsiii commented on Aug 14, 2019

    @jfsiii
    Author

    Yeah, version: { min: 7.0.0 } is what I'd expect for nested values.

    If we don't think we'll add many more items under version, or as siblings, we could keep them flattened. In that case versionMin is the most idiomatic, but version_min is acceptable.

    The challenge is that . can't be in an identifier in JS, so you're forced to access like kibana['version.min'] with the current approach

  3. ruflin commented on Aug 14, 2019

    @ruflin
    Contributor

    My personal preference is version: { min: 7.0.0 }. If I remember correctly, I added the prefix version as I expect more things to show up under kibana like which plugins are installed etc. This makes it more obvious that we talk about the version here.

    For the dot notation vs versionMin and version_min: I'm just very used to it from ECS and Beats.

  4. added a commit that references this issue on Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions