Merge remote-tracking branch 'origin/master' into kitsune/cleanup
This commit is contained in:
commit
8e7c0dfb93
90 changed files with 3314 additions and 392 deletions
83
scripts/css/pygments.css
Normal file
83
scripts/css/pygments.css
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
Original styles generated from:
|
||||
pygmentize -f html -S colorful -a pre.code > ./scripts/css/pygments.css
|
||||
|
||||
Rules for which we don't want the syntax highlighter to kick in are commented
|
||||
out at the bottom.
|
||||
|
||||
Windows users: if you regenerate this file, you'll need to re-save it as utf-8
|
||||
to make docutils happy.
|
||||
*/
|
||||
|
||||
/* DIFFS */
|
||||
pre.code .gd { color: #A00000 } /* Generic.Deleted */
|
||||
pre.code .gi { color: #00A000 } /* Generic.Inserted */
|
||||
|
||||
/* UNUSED */
|
||||
/*pre.code .hll { background-color: #ffffcc }*/
|
||||
/*pre.code { background: #ffffff; }*/
|
||||
/*pre.code .c { color: #888888 } !* Comment *!*/
|
||||
/*pre.code .err { color: #FF0000; background-color: #FFAAAA } !* Error *!*/
|
||||
/*pre.code .k { color: #008800; font-weight: bold } !* Keyword *!*/
|
||||
/*pre.code .o { color: #333333 } !* Operator *!*/
|
||||
/*pre.code .ch { color: #888888 } !* Comment.Hashbang *!*/
|
||||
/*pre.code .cm { color: #888888 } !* Comment.Multiline *!*/
|
||||
/*pre.code .cp { color: #557799 } !* Comment.Preproc *!*/
|
||||
/*pre.code .cpf { color: #888888 } !* Comment.PreprocFile *!*/
|
||||
/*pre.code .c1 { color: #888888 } !* Comment.Single *!*/
|
||||
/*pre.code .cs { color: #cc0000; font-weight: bold } !* Comment.Special *!*/
|
||||
/*pre.code .ge { font-style: italic } !* Generic.Emph *!*/
|
||||
/*pre.code .gr { color: #FF0000 } !* Generic.Error *!*/
|
||||
/*pre.code .gh { color: #000080; font-weight: bold } !* Generic.Heading *!*/
|
||||
/*pre.code .go { color: #888888 } !* Generic.Output *!*/
|
||||
/*pre.code .gp { color: #c65d09; font-weight: bold } !* Generic.Prompt *!*/
|
||||
/*pre.code .gs { font-weight: bold } !* Generic.Strong *!*/
|
||||
/*pre.code .gu { color: #800080; font-weight: bold } !* Generic.Subheading *!*/
|
||||
/*pre.code .gt { color: #0044DD } !* Generic.Traceback *!*/
|
||||
/*pre.code .kc { color: #008800; font-weight: bold } !* Keyword.Constant *!*/
|
||||
/*pre.code .kd { color: #008800; font-weight: bold } !* Keyword.Declaration *!*/
|
||||
/*pre.code .kn { color: #008800; font-weight: bold } !* Keyword.Namespace *!*/
|
||||
/*pre.code .kp { color: #003388; font-weight: bold } !* Keyword.Pseudo *!*/
|
||||
/*pre.code .kr { color: #008800; font-weight: bold } !* Keyword.Reserved *!*/
|
||||
/*pre.code .kt { color: #333399; font-weight: bold } !* Keyword.Type *!*/
|
||||
/*pre.code .m { color: #6600EE; font-weight: bold } !* Literal.Number *!*/
|
||||
/*pre.code .s { background-color: #fff0f0 } !* Literal.String *!*/
|
||||
/*pre.code .na { color: #0000CC } !* Name.Attribute *!*/
|
||||
/*pre.code .nb { color: #007020 } !* Name.Builtin *!*/
|
||||
/*pre.code .nc { color: #BB0066; font-weight: bold } !* Name.Class *!*/
|
||||
/*pre.code .no { color: #003366; font-weight: bold } !* Name.Constant *!*/
|
||||
/*pre.code .nd { color: #555555; font-weight: bold } !* Name.Decorator *!*/
|
||||
/*pre.code .ni { color: #880000; font-weight: bold } !* Name.Entity *!*/
|
||||
/*pre.code .ne { color: #FF0000; font-weight: bold } !* Name.Exception *!*/
|
||||
/*pre.code .nf { color: #0066BB; font-weight: bold } !* Name.Function *!*/
|
||||
/*pre.code .nl { color: #997700; font-weight: bold } !* Name.Label *!*/
|
||||
/*pre.code .nn { color: #0e84b5; font-weight: bold } !* Name.Namespace *!*/
|
||||
/*pre.code .nt { color: #007700 } !* Name.Tag *!*/
|
||||
/*pre.code .nv { color: #996633 } !* Name.Variable *!*/
|
||||
/*pre.code .ow { color: #000000; font-weight: bold } !* Operator.Word *!*/
|
||||
/*pre.code .w { color: #bbbbbb } !* Text.Whitespace *!*/
|
||||
/*pre.code .mb { color: #6600EE; font-weight: bold } !* Literal.Number.Bin *!*/
|
||||
/*pre.code .mf { color: #6600EE; font-weight: bold } !* Literal.Number.Float *!*/
|
||||
/*pre.code .mh { color: #005588; font-weight: bold } !* Literal.Number.Hex *!*/
|
||||
/*pre.code .mi { color: #0000DD; font-weight: bold } !* Literal.Number.Integer *!*/
|
||||
/*pre.code .mo { color: #4400EE; font-weight: bold } !* Literal.Number.Oct *!*/
|
||||
/*pre.code .sa { background-color: #fff0f0 } !* Literal.String.Affix *!*/
|
||||
/*pre.code .sb { background-color: #fff0f0 } !* Literal.String.Backtick *!*/
|
||||
/*pre.code .sc { color: #0044DD } !* Literal.String.Char *!*/
|
||||
/*pre.code .dl { background-color: #fff0f0 } !* Literal.String.Delimiter *!*/
|
||||
/*pre.code .sd { color: #DD4422 } !* Literal.String.Doc *!*/
|
||||
/*pre.code .s2 { background-color: #fff0f0 } !* Literal.String.Double *!*/
|
||||
/*pre.code .se { color: #666666; font-weight: bold; background-color: #fff0f0 } !* Literal.String.Escape *!*/
|
||||
/*pre.code .sh { background-color: #fff0f0 } !* Literal.String.Heredoc *!*/
|
||||
/*pre.code .si { background-color: #eeeeee } !* Literal.String.Interpol *!*/
|
||||
/*pre.code .sx { color: #DD2200; background-color: #fff0f0 } !* Literal.String.Other *!*/
|
||||
/*pre.code .sr { color: #000000; background-color: #fff0ff } !* Literal.String.Regex *!*/
|
||||
/*pre.code .s1 { background-color: #fff0f0 } !* Literal.String.Single *!*/
|
||||
/*pre.code .ss { color: #AA6600 } !* Literal.String.Symbol *!*/
|
||||
/*pre.code .bp { color: #007020 } !* Name.Builtin.Pseudo *!*/
|
||||
/*pre.code .fm { color: #0066BB; font-weight: bold } !* Name.Function.Magic *!*/
|
||||
/*pre.code .vc { color: #336699 } !* Name.Variable.Class *!*/
|
||||
/*pre.code .vg { color: #dd7700; font-weight: bold } !* Name.Variable.Global *!*/
|
||||
/*pre.code .vi { color: #3333BB } !* Name.Variable.Instance *!*/
|
||||
/*pre.code .vm { color: #996633 } !* Name.Variable.Magic *!*/
|
||||
/*pre.code .il { color: #0000DD; font-weight: bold } !* Literal.Number.Integer.Long *!*/
|
|
@ -273,6 +273,7 @@ def rst2html(i, o, stylesheets):
|
|||
writer_name="html",
|
||||
settings_overrides={
|
||||
"stylesheet_path": stylesheets,
|
||||
"syntax_highlight": "short",
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
@ -213,6 +213,7 @@ def get_json_schema_object_fields(obj, enforce_title=False):
|
|||
res = process_data_type(additionalProps)
|
||||
tables = res["tables"]
|
||||
val_title = res["title"]
|
||||
gen_title = "{%s: %s}" % (key_type, val_title)
|
||||
if res.get("enum_desc") and val_title != "enum":
|
||||
# A map to enum needs another table with enum description
|
||||
tables.append(TypeTable(
|
||||
|
@ -220,7 +221,7 @@ def get_json_schema_object_fields(obj, enforce_title=False):
|
|||
rows=[TypeTableRow(key="(mapped value)", title="enum", desc=res["desc"])]
|
||||
))
|
||||
return {
|
||||
"title": "{%s: %s}" % (key_type, val_title),
|
||||
"title": obj_title if obj_title else gen_title,
|
||||
"tables": tables,
|
||||
}
|
||||
|
||||
|
@ -909,6 +910,13 @@ class MatrixUnits(Units):
|
|||
Units.prop(json_schema, "properties/content")
|
||||
)
|
||||
|
||||
# Include UnsignedData if it is present on the object
|
||||
unsigned = Units.prop(json_schema, "properties/unsigned")
|
||||
if unsigned:
|
||||
tbls = get_tables_for_schema(unsigned)
|
||||
for tbl in tbls:
|
||||
schema["content_fields"].append(tbl)
|
||||
|
||||
# grab msgtype if it is the right kind of event
|
||||
msgtype = Units.prop(
|
||||
json_schema, "properties/content/properties/msgtype/enum"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue