Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC URL endpoint building #101

Closed
hachreak opened this issue Jul 19, 2016 · 2 comments · Fixed by #119
Closed

RFC URL endpoint building #101

hachreak opened this issue Jul 19, 2016 · 2 comments · Fixed by #119
Assignees

Comments

@hachreak
Copy link
Member

hachreak commented Jul 19, 2016

There is a specific reason why to construct the url endpoint is used the key of RECORDS_REST_ENDPOINTS and sometimes the pid_type?
See:

Can we simplify and use only one way?
Maybe the best solution is to use the pid_type everywhere. WDYT? There are some contraindications?


ping @jirikuncar @lnielsen @tiborsimko

@jirikuncar jirikuncar changed the title [RFC] url endpoint building RFC URL endpoint building Jul 19, 2016
@jirikuncar
Copy link
Member

There must exist one key per pid_type (see https://github.com/inveniosoftware/invenio-records-rest/blob/master/invenio_records_rest/utils.py#L104-L126). However, one can have multiple endpoints for same pid_type. We will have to address it in #99 and #100.

nikofil added a commit to nikofil/invenio-records-rest that referenced this issue Aug 31, 2016
* Changes views.py to use pid_type in the endpoint map instead of the key for
  the name of the endpoint. (closes inveniosoftware#101)

Signed-off-by: Nikos Filippakis <[email protected]>
@nikofil nikofil self-assigned this Aug 31, 2016
@kaplun
Copy link
Member

kaplun commented Sep 29, 2016

Hi! What is the status of this issue? In INSPIRE we are trying to move to official invenio-pidstore, (see inveniosoftware/invenio-pidstore#63 (comment)) but this is currently blocked by this specific usage of pid_type in building the endpoints.

kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Sep 30, 2016
* NEW Introduces new RECORDS_REST_PID_TYPE_DEFAULT_ENDPOINT config
  variable, needed in order to know which default endpoint corresponds
  to which pid_type when building URIs. (closes inveniosoftware#101)

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Sep 30, 2016
* NEW Introduces new RECORDS_REST_PID_TYPE_DEFAULT_ENDPOINT config
  variable, needed in order to know which default endpoint corresponds
  to which pid_type when building URIs. (closes inveniosoftware#101)

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 5, 2016
* NEW Introduces new RECORDS_REST_PID_TYPE_DEFAULT_ENDPOINT config
  variable, needed in order to know which default endpoint corresponds
  to which pid_type when building URIs. (closes inveniosoftware#101)

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 5, 2016
* NEW Introduces new RECORDS_REST_PID_TYPE_DEFAULT_ENDPOINT config
  variable, needed in order to know which default endpoint corresponds
  to which pid_type when building URIs. (closes inveniosoftware#101)

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 5, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefix` prefix to explicitly
  declare which `endpoint-prefix` to use in case of ambiguity.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 5, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefix` prefix to explicitly
  declare which `endpoint-prefix` to use in case of ambiguity.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 5, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefix` prefix to explicitly
  declare which `endpoint-prefix` to use in case of ambiguity.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 6, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefix` prefix to explicitly
  declare which `endpoint-prefix` to use in case of ambiguity.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 6, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 6, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 6, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 6, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 7, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 7, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 7, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 7, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
kaplun added a commit to kaplun/invenio-records-rest that referenced this issue Oct 7, 2016
* NEW Introduces new get_default_endpoint_for() helper to obtain the
  default endpoint-prefix to be used to build endpoints for a given
  `pid_type`. (closes inveniosoftware#101)

* NEW Introduces new `default_endpoint_prefixes` property to explicitly
  declare which `endpoint-prefix` to use for which `pid_type`.

Signed-off-by: Samuele Kaplun <[email protected]>
jirikuncar pushed a commit to jirikuncar/invenio-records-rest that referenced this issue Oct 7, 2016
* NEW Introduces new cached property on extension state called
 `default_endpoint_prefixes` that maps `pid_type` to an
 `endpoint-prefix` used to build endpoints. (closes inveniosoftware#101)

Reviewed-by: Jiri Kuncar <[email protected]>
Signed-off-by: Samuele Kaplun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants