Skip to content

Commit

Permalink
fix(InlineContent): Add array and object to valid inline content
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jun 2, 2021
1 parent cfcb195 commit 7483e80
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/stencila/schema/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4390,7 +4390,7 @@ class CitationIntentEnumeration(Enum):
"""
Union type for valid inline content.
"""
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]
InlineContent = Union["AudioObject", "Cite", "CiteGroup", "CodeExpression", "CodeFragment", "Delete", "Emphasis", "ImageObject", "Link", "MathFragment", "MediaObject", "NontextualAnnotation", "Note", "Quote", "Strong", "Subscript", "Superscript", "VideoObject", None, bool, int, float, Array[Any], Dict[str, Any], 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 @@ -4484,7 +4484,7 @@ GrantTypes <- Union(Grant, MonetaryGrant)
#'
#' @return A `list` of class `Union` describing valid subtypes of this type
#' @export
InlineContent <- Union(AudioObject, Cite, CiteGroup, CodeExpression, CodeFragment, Delete, Emphasis, ImageObject, Link, MathFragment, MediaObject, NontextualAnnotation, Note, Quote, Strong, Subscript, Superscript, VideoObject, "NULL", "logical", "numeric", "character")
InlineContent <- Union(AudioObject, Cite, CiteGroup, CodeExpression, CodeFragment, Delete, Emphasis, ImageObject, Link, MathFragment, MediaObject, NontextualAnnotation, Note, Quote, Strong, Subscript, Superscript, VideoObject, "NULL", "logical", "numeric", Array(Any()), "list", "character")


#' All type schemas that are derived from Mark
Expand Down
2 changes: 2 additions & 0 deletions rust/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4908,6 +4908,8 @@ pub enum InlineContent {
Bool(Bool),
Integer(Integer),
Number(Number),
Array(Array),
Object(Object),
String(String),
}

Expand Down
2 changes: 2 additions & 0 deletions schema/InlineContent.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ anyOf:
- type: boolean
- type: integer
- type: number
- type: array
- type: object
- type: string
2 changes: 1 addition & 1 deletion ts/bindings/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export const generateTypeMaps = async (): Promise<string> => {
T extends { type: string } & object = { type: string }
> = { [key in T['type']]: key }
type Primitives = undefined | null | boolean | string | number;
type Primitives = undefined | null | boolean | number | string | object;
` +
files
.map((file) => {
Expand Down

0 comments on commit 7483e80

Please sign in to comment.