Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

hardware_product view, edit pages need revisions #293

Open
karenetheridge opened this issue Nov 30, 2020 · 3 comments
Open

hardware_product view, edit pages need revisions #293

karenetheridge opened this issue Nov 30, 2020 · 3 comments
Assignees
Labels
api Changes required to keep pace with changes in the api blocker Blocking release of the API

Comments

@karenetheridge
Copy link
Contributor

karenetheridge commented Nov 30, 2020

The pages for viewing and editing hardware products have some issues.

  • the "specification" field is rendered improperly. Note that the type of this field changed a while back (inflate hardware_product.specification in requests and responses conch-api#1034, which was reviewed)
  • when clicking "Edit", it is unclear which properties are editable and which are not. I suggest greying out the uneditable fields, or using a different font, or perhaps moving them to the top of the page.

This table and its associated values will be undergoing revisions soon, and the "specification" field within it will become dynamic, so it is impractical to hardcode the field names and their titles. I have added 'title' annotations to the request and response schema to provide the field labels; I also added 'readOnly' annotations to the response to make it clear which fields are not editable via
POST /hardware_product/:id or POST /hardware_product (see joyent/conch-api#1069)

You can obtain these schemas dynamically via GET /json_schema/<type>/<name> (see https://joyent.github.io/conch-api/modules/Conch::Route::JSONSchema), from which the page can be dynamically rendered. The content of these responses will not change between conch-api version number bumps, but the specification field's content can be determined via GET /json_schema/hardware_product/specification/latest and its content can be expected to change at any time. In all cases, GET /json_schema/* requests will respect caching headers (Last-Modified, If-Modified-Since, ETag etc).

@karenetheridge karenetheridge added the api Changes required to keep pace with changes in the api label Nov 30, 2020
@bdelano
Copy link

bdelano commented Dec 1, 2020

would something like this help @dustinryerson
https://github.com/crickford/vue-json-schema-form

@karenetheridge
Copy link
Contributor Author

I am not familiar with the details of the framework he is using. There are many implementations listed at https://json-schema.org/implementations.html but I kept the schema simple enough that a tool may not even be needed.

@karenetheridge karenetheridge added the blocker Blocking release of the API label Dec 9, 2020
@dustinryerson dustinryerson self-assigned this Dec 23, 2020
@karenetheridge
Copy link
Contributor Author

there is also https://github.com/ncform/ncform -- if it is any good, please add it to the implementations page on json-schema.org.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api Changes required to keep pace with changes in the api blocker Blocking release of the API
Projects
None yet
Development

No branches or pull requests

3 participants