Skip to content

has_s2r and has_r2s always false for aliases #290

@scossu

Description

@scossu

The /languages endpoint always shows false values for has_s2r and has_r2s . This is because aliases don't have their own table, and the function that sets the values has_s2r and has_r2s is not accounting for that redirection.

There are two options to solve this:

  1. add the alias_of key to aliases, pointing to the language that the entry is an alias of. This is more transparent in regard to the entry being an alias, and also easier to maintain because it requires no other coordination; however it requires changes to the API client which needs to perform another lookup in the JSON structure to find further metadata for the actual table.
  2. Copy relevant metadata from the actual table to the alias. This maintains consistency of behavior, but it duplicates data and may require adjustments if new keys are added to the index later on. It can be used in conjunction to # 1 to keep transparency about the alias.

I lean toward # 1. @thisismattmiller @tventimi would this affect your API clients significantly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions