Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Widget to dynamically supply a UID #92

Closed
pensivedog opened this issue Nov 23, 2022 · 6 comments · Fixed by #719 or #764
Closed

Widget to dynamically supply a UID #92

pensivedog opened this issue Nov 23, 2022 · 6 comments · Fixed by #719 or #764
Labels
enhancement New feature or request

Comments

@pensivedog
Copy link

As described here, "relations should not be being declared based on properties that can be edited by a user."

Here's one solution, available as an add in.

IMHO, this is one of the REALLY basic things that any CMS needs in order to be a viable solution for sites with more than a few pages/relations.

@KaneFreeman
Copy link
Collaborator

Sounds like a good idea to add.

@KaneFreeman KaneFreeman added the enhancement New feature or request label Nov 23, 2022
@robigan
Copy link
Contributor

robigan commented Nov 28, 2022

I have taken an interest in this repo while my PR in the bitcoin repo gets finalized so I might be able to do a PR before v1 drops

@Greenheart
Copy link

@KaneFreeman KaneFreeman mentioned this issue Jan 27, 2023
11 tasks
@shumiyao
Copy link

shumiyao commented Jan 28, 2023

I did a similar effort

https://gist.github.com/shumiyao/0d11a37dcfb7e53d97bba8cceaef5b7b

It apparently seems to work.

@KaneFreeman KaneFreeman linked a pull request Apr 20, 2023 that will close this issue
@KaneFreeman
Copy link
Collaborator

KaneFreeman commented Apr 20, 2023

This will be part of the 2.0.0 release. Which hopefully will be out in the next few days.

@liufuyang
Copy link

liufuyang commented Apr 24, 2023

@KaneFreeman It would be super nice if we could add a prefix parameter for the UUID widget, so the generated id can be customized such as books/05597998-ab63-4a69-abb6-259846fa4933 when an optional prefix is set to books/.

Do you think it is something easy to add? :)

Just some background info - we are trying to follow Google's "API Improvement Proposals" or AIP - it specifies the "resource names" should be like

Resource name components should usually alternate between collection identifiers (example: publishers, books, users) and resource IDs (example: 123, les-miserables, vhugo1802).

See more here:
https://google.aip.dev/122

If this can be achieved, then the data generated or stored with StaticJsCMS then can be directly loaded into our backend services and we can use the id of each element here as the resource names :)

@KaneFreeman KaneFreeman linked a pull request Apr 25, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
6 participants