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

Add ability to enumerate instances of types to returned JSONSchemas #518

Open
keithralphs opened this issue Jun 24, 2024 · 3 comments
Open
Labels
enhancement New feature or request rest api Potential REST API changes

Comments

@keithralphs
Copy link
Contributor

At the moment on the /plans and /plans/(name} endpoints, the returned JSONSchemas that describe the plan(s) provide the types of objects with bluesky interfaces (e.g. detectors, axes etc.) that represent items bluesky talks to rather than the enumerated names of these items. This is perfectly reasonable and suitable for the command line inteface, GDA etc., but is not ideal for generating basic UIs from plan descriptions via e.g. JSONForms. For this use case, a list of the names of the devices avaliable on the beamline rather than their type is what is required so that these can be automatically presented to the user for selection to be passed back when the form is submitted.

The capablity to present the information in this form should be added to the plans endpoints either as an option (.g. ?enumerated=true) or as a separate version of the endpoints to allow both the current and desired functionality to be supported. The extra information should probably be provided as well as rather than instead of the class names. This will allow the addition of a new plan to the beamline to automatically extend the range of basic web UIs available as well providing richer information for future fully fledged UIs, whilst still supporting existing interfaces.

@callumforrester
Copy link
Collaborator

to allow both the current and desired functionality to be supported

Is there a use case for the current functionality? If not I say we drop it and just have the desired functionality.

@keithralphs
Copy link
Contributor Author

to allow both the current and desired functionality to be supported

Is there a use case for the current functionality? If not I say we drop it and just have the desired functionality.

Dunno, I just assumed it was that way because the current CI used it, if not then maybe.

@callumforrester
Copy link
Collaborator

I think it is just the simplest possible implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rest api Potential REST API changes
Projects
None yet
Development

No branches or pull requests

2 participants