Feature #1516
closedAPI: implement Google JSON style
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/- type_tree -> typeTree
- legal-notice -> legalNotice
- site-name -> siteName
- system_class -> systemClass
- node_entities -> nodeEntities
- node_entities_all -> nodeEntitiesAll
- subunit_hierarchy -> subunitHierarchy
- reference_system -> referenceSystem
- system_class -> systemClass
- 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
Updated by Bernhard Koschiček-Krombholz over 3 years ago
- 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.
Updated by Christoph Hoffmann over 3 years ago
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 ;) )
Updated by Bernhard Koschiček-Krombholz over 3 years ago
Ok, now I get it. Will change it, should be done for the next version.
Updated by Alexander Watzinger over 3 years ago
- 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.
Updated by Bernhard Koschiček-Krombholz over 3 years ago
Changed:
/api/0.2/type_tree/- type_tree -> typeTree
- legal-notice -> legalNotice
- site-name -> siteName
- system_class -> systemClass
- node_entities -> nodeEntities
- node_entities_all -> nodeEntitiesAll
- subunit_hierarchy -> subunitHierarchy
- reference_system -> referenceSystem
- system_class -> systemClass
- result -> results
- start_id -> startID
- entity_per_page -> entitiesPerPage
- total_pages -> totalPages
Updated by Bernhard Koschiček-Krombholz over 3 years ago
- Status changed from Assigned to In Progress
Updated by Bernhard Koschiček-Krombholz over 3 years ago
- 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
Updated by Bernhard Koschiček-Krombholz over 3 years ago
- Description updated (diff)
Updated by Christoph Hoffmann over 3 years ago
works but I nn to finish updating some of the swagger file