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

David/dynamic endpoints #274

Merged
merged 7 commits into from
Oct 8, 2024
Merged

Conversation

recalcitrantsupplant
Copy link
Collaborator

Specifies that "data" endpoints are defined dynamically. "Data" endpoints are what has been these endpoints:

/catalogs
/catalogs/{catalogId}
/catalogs/{catalogId}/collections
/catalogs/{catalogId}/collections/{recordsCollectionId}
/catalogs/{catalogId}/collections/{recordsCollectionId}/items
/catalogs/{catalogId}/collections/{recordsCollectionId}/items/{itemId}

These endpoints are now loaded dynamically based on RDF declarations in:
prez/reference_data/endpoints/data_endpoints_default

To instead use custom endpoints, follow the instructions in the README-Custom-Endpoints.md

In summary Prez will:
If CUSTOM_ENDPOINTS is "true":

  • look for endpoints in the data repo (e.g. triplestore), and if declarations are found, dynamically load these
  • if no definitions are found, the local directory is checked prez/reference_data/endpoints/data_endpoints_custom, and if declarations are found, these are dynamically loaded.
    If CUSTOM_ENDPOINTS is unset or any other value:
  • the endpoints defined in prez/reference_data/endpoints/data_endpoints_default are loaded.

@lalewis1
Copy link
Collaborator

lalewis1 commented Oct 4, 2024

still testing but initial note:

it has created the endpoints dynamically but when I browse the /catalogs endpoint no data is shown even though the target class is dcat:Catalog and there are dcat:Catalog 's defined in the data (and the catalogs do have dcat:Resource 's in them related via dcterms:hasPart)

nevermind, it does this on main branch too. must be something with my data.

Copy link
Collaborator

@lalewis1 lalewis1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. just pushed a small commit to fix the relative path not resolving in my environment (for the static files folder)

@recalcitrantsupplant recalcitrantsupplant merged commit 7ceebfd into main Oct 8, 2024
1 check passed
@recalcitrantsupplant recalcitrantsupplant deleted the david/dynamic-endpoints branch October 8, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants