Project

General

Profile

Feature #1516

API: implement Google JSON style

Added by Christoph Hoffmann 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Low
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 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

History

#1

Updated by Bernhard Koschiček-Krombholz 5 months ago

  • Assignee set to Bernhard Koschiček-Krombholz
  • Status changed from New to Acknowledged
  • Category set to API

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.

#2

Updated by Christoph Hoffmann 5 months 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 ;) )
#3

Updated by Bernhard Koschiček-Krombholz 5 months ago

Ok, now I get it. Will change it, should be done for the next version.

#4

Updated by Alexander Watzinger 5 months ago

  • Status changed from Acknowledged to Assigned
  • Description updated (diff)
  • Subject changed from implement Google JSON Style for API output to API - implement Google JSON style
  • Tracker changed from Question to Feature

Promoting this question to a feature request, minor formatting changes.

#5

Updated by Bernhard Koschiček-Krombholz 5 months 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
#6

Updated by Bernhard Koschiček-Krombholz 5 months ago

  • Status changed from Assigned to In Progress
#7

Updated by Bernhard Koschiček-Krombholz 5 months ago

  • Target version changed from Wishlist to 6.3.0
  • Status changed from In Progress to Closed
  • Description updated (diff)
  • Subject changed from API - implement Google JSON style to API: implement Google JSON style
#8

Updated by Bernhard Koschiček-Krombholz 5 months ago

  • Description updated (diff)
#9

Updated by Christoph Hoffmann 5 months ago

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

Also available in: Atom PDF