Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Schema/update #178

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jeanbaptistemorin
Copy link

🤖 🤖, small PR on schemas!

  • Adding js-beautify to have readable output
  • The object.json looks more like a context.json according to the docs. "Object" in the documentation is more the base object of all the Objects, or a generic type for Context and Tags, right? Moved the object.json in context.json
  • Collections: moved to only Media items in activity for now, discussed with @killix
  • Object enum in tag.
  • id in context.

What do you think?

@CLAassistant
Copy link

CLAassistant commented Aug 24, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@killix killix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Basically context is a duplicate of Object use in the object Object. This is use to pass additinal data as the context. (usefull in flowdock case to track the thread). Check https://www.w3.org/TR/activitystreams-vocabulary/#dfn-context

@@ -5,9 +5,9 @@
"embedded/group",
"embedded/tag",
"object/collection",
"object/context",
"object/media",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object need also to be in the list ;)

@@ -34,4 +34,6 @@ properties:
required: [ type, id, url ]
- $ref: "http://schemas.broid.ai/object/place.json"
required: [ type, id, latitude, longitude ]
- $ref: "http://schemas.broid.ai/object/collection.json"
required: [ type, items ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@@ -4,8 +4,8 @@
- embedded/group
- embedded/tag
- object/collection
- object/context
- object/media
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • object/context, need to be here also

@jeanbaptistemorin
Copy link
Author

@killix thanks! Reverted the object/object back with

type: object
properties:
  id:
    type: string
  type:
    type: string
    enum: [ Note, Image, Video, Audio, Place, Document ]
required: [ id, type ]

to fit the doc. Is that correct?

Note for later: As Note, Media, Place... inherits object, maybe that inheritance could be mapped with a allOf later?

@jeanbaptistemorin
Copy link
Author

Forgot the attachements. ✋ Will add that 🕐

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants