Normalizing field names in API

Hello @Jason_Vallet and @melancon , here is an issue:

  • in the comments opencare API the full text is called "content" https://edgeryders.eu/guy-comment
  • but in the content (posts and other Drupal nodes) the same field is called "Body" https://edgeryders.eu/guy-content

I am going to call everyting “body” (non capitalized). Is that OK?

Some normalization work already done here

Let’s wait for @Jason_Vallet  answer, he has doen some work noramlizing field names across views.

No problem

The views I am currently using are called “opencare_*_rename” so feel free to change the old views if you need to or use (or clone) mine. There is still some work needed if we want to fully normalize and add some level of abstraction to the data but at least the field names used are consistent now.

(Fyi, you can use the “pretty” variations if you need a more legible json file).

1 Like

Let’s converge!

No, I think we should be using the same view as an API (and probably give it a better name, too). This way the code gets normalized, too. I’ll edit my code to work with your view.