Skip to content

Commit

Permalink
fix(Inline Content): Add audio, media and video objects; reorder prim…
Browse files Browse the repository at this point in the history
…itives
  • Loading branch information
nokome committed Apr 12, 2021
1 parent 4acc3ba commit de6cfd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion py/stencila/schema/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3973,7 +3973,7 @@ def __init__(
"""
Union type for valid inline content.
"""
InlineContent = Union["Cite", "CiteGroup", "CodeExpression", "CodeFragment", "Delete", "Emphasis", "ImageObject", "Link", "MathFragment", "NontextualAnnotation", "Note", "Quote", "Strong", "Subscript", "Superscript", int, float, bool, None, str]
InlineContent = Union["AudioObject", "Cite", "CiteGroup", "CodeExpression", "CodeFragment", "Delete", "Emphasis", "ImageObject", "Link", "MathFragment", "MediaObject", "NontextualAnnotation", "Note", "Quote", "Strong", "Subscript", "Superscript", "VideoObject", None, bool, int, float, str]


"""
Expand Down
2 changes: 1 addition & 1 deletion r/R/types.R
Original file line number Diff line number Diff line change
Expand Up @@ -4303,7 +4303,7 @@ GrantTypes <- Union(Grant, MonetaryGrant)
#'
#' @return A `list` of class `Union` describing valid subtypes of this type
#' @export
InlineContent <- Union(Cite, CiteGroup, CodeExpression, CodeFragment, Delete, Emphasis, ImageObject, Link, MathFragment, NontextualAnnotation, Note, Quote, Strong, Subscript, Superscript, "numeric", "logical", "NULL", "character")
InlineContent <- Union(AudioObject, Cite, CiteGroup, CodeExpression, CodeFragment, Delete, Emphasis, ImageObject, Link, MathFragment, MediaObject, NontextualAnnotation, Note, Quote, Strong, Subscript, Superscript, VideoObject, "NULL", "logical", "numeric", "character")


#' All type schemas that are derived from Mark
Expand Down
9 changes: 6 additions & 3 deletions schema/InlineContent.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ $comment: |
order of attempted coercion (particularly important for primitive types).
anyOf:
# Entity types in alphabetical order
- $ref: AudioObject
- $ref: Cite
- $ref: CiteGroup
- $ref: CodeExpression
Expand All @@ -18,16 +19,18 @@ anyOf:
- $ref: ImageObject
- $ref: Link
- $ref: MathFragment
- $ref: MediaObject
- $ref: NontextualAnnotation
- $ref: Note
- $ref: Quote
- $ref: Strong
- $ref: Subscript
- $ref: Superscript
# Primitive types in the order that coersion from
- $ref: VideoObject
# Primitive types in the order that coercion from
# string should be attempted (for example by Ajv, or by serde_json).
- type: 'null'
- type: boolean
- type: integer
- type: number
- type: boolean
- type: 'null'
- type: string

0 comments on commit de6cfd5

Please sign in to comment.