Project

General

Profile

Actions

Feature #1516

closed

API: implement Google JSON style

Added by Christoph Hoffmann over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Start date:
2021-05-17
Estimated time:

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
/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

Actions #1

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.

Actions #2

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 ;) )
Actions #3

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.

Actions #4

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.

Actions #5

Updated by Bernhard Koschiček-Krombholz over 3 years ago

Changed:

/api/0.2/type_tree/
  • type_tree -> typeTree
/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
Actions #6

Updated by Bernhard Koschiček-Krombholz over 3 years ago

  • Status changed from Assigned to In Progress
Actions #7

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
Actions #8

Updated by Bernhard Koschiček-Krombholz over 3 years ago

  • Description updated (diff)
Actions #9

Updated by Christoph Hoffmann over 3 years ago

works but I nn to finish updating some of the swagger file

Actions

Also available in: Atom PDF