Feature #1516
closed
API: implement Google JSON style
Added by Christoph Hoffmann over 3 years ago.
Updated over 3 years ago.
Description
We shortly talked about it initially but never made it explicit, however for ease of use in consuming applications I propose to use the Google JSON Style for the API output.
This specifically concerns the Property Naming which is a precondition to implement the linting/naming conventions in the current OpenAtlasDiscovery (origin) implementation.
Changed properties:
/api/0.2/type_tree/
/api/0.2/content/
- legal-notice -> legalNotice
- site-name -> siteName
/api/0.2/usage/
- system_class -> systemClass
- node_entities -> nodeEntities
- node_entities_all -> nodeEntitiesAll
- subunit_hierarchy -> subunitHierarchy
Linked Place output
- reference_system -> referenceSystem
- system_class -> systemClass
Everything with pagination and results
- result -> results
- start_id -> startID
- entity_per_page -> entitiesPerPage
- total_pages -> totalPages
Updated the swagger file: https://app.swaggerhub.com/apis/ctot-nondef/OpenAtlas/0.2-develop
- Category set to API
- Status changed from New to Acknowledged
- Assignee set to Bernhard Koschiček-Krombholz
So you mean, that we should change the Linked Places property naming to Google Json Style? Or should we make the option for a parameter for renaming the properties? Or should we make a new and different output with our own style and property names?
If you have a little time, we also can discuss this via video call.
linked places/JSON-LD is already following the google JSON style (or maybe the google style is formulated around the JSON-LD convention? ^^ )
the question mainly concerned the parts of the API not governed by the linked places schema, ie
- content where the "-" in the property names are strictly speaking JSON conforming but troublesome to work with on the client side => cameCase would be preferred
- pagination object where the "_" in the property names pose a similar issue (but are, as said, strictly speaking JSON conforming, so it's not high priority ;) )
Ok, now I get it. Will change it, should be done for the next version.
- Tracker changed from Question to Feature
- Subject changed from implement Google JSON Style for API output to API - implement Google JSON style
- Description updated (diff)
- Status changed from Acknowledged to Assigned
Promoting this question to a feature request, minor formatting changes.
Changed:
/api/0.2/type_tree/
/api/0.2/content/
- legal-notice -> legalNotice
- site-name -> siteName
/api/0.2/usage/
- system_class -> systemClass
- node_entities -> nodeEntities
- node_entities_all -> nodeEntitiesAll
- subunit_hierarchy -> subunitHierarchy
Linked Place output
- reference_system -> referenceSystem
- system_class -> systemClass
Everything with pagination and results
- result -> results
- start_id -> startID
- entity_per_page -> entitiesPerPage
- total_pages -> totalPages
- Status changed from Assigned to In Progress
- Subject changed from API - implement Google JSON style to API: implement Google JSON style
- Description updated (diff)
- Status changed from In Progress to Closed
- Target version changed from Wishlist to 6.3.0
- Description updated (diff)
works but I nn to finish updating some of the swagger file
Also available in: Atom
PDF