Skip to content

Commit

Permalink
Fix node ids not being unique breaking tabs in JS template (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
dblanchette committed Jan 4, 2022
1 parent 74967c1 commit 40104da
Show file tree
Hide file tree
Showing 15 changed files with 9,485 additions and 33 deletions.
58 changes: 58 additions & 0 deletions docs/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2000,6 +2000,64 @@ the description of an attribute
[examples/examples_md_nested_with_badges/ref_merge.md](examples/examples_md_nested_with_badges/ref_merge.md ':include')
</details>

## --ref_with_tabs--
### ref_with_tabs


<details>
<summary>Json schema - Click here to expand source code...</summary>

[examples/cases/ref_with_tabs.json](examples/cases/ref_with_tabs.json ':include :type=code')
</details>


<details>
<summary>JS template - Click here to expand the rendered result...</summary>
<a href="https://coveooss.github.io/json-schema-for-humans/examples/examples_js_default/ref_with_tabs.html" target="_blank">Open it in full page</a>

[examples/examples_js_default/ref_with_tabs.html](examples/examples_js_default/ref_with_tabs.html ':include :type=iframe width=100% height=400px')
</details>


<details>
<summary>Flat template - Click here to expand the rendered result...</summary>
<a href="https://coveooss.github.io/json-schema-for-humans/examples/examples_flat_default/ref_with_tabs.html" target="_blank">Open it in full page</a>

[examples/examples_flat_default/ref_with_tabs.html](examples/examples_flat_default/ref_with_tabs.html ':include :type=iframe width=100% height=400px')
</details>


<details>
<summary>Markdown without badge template - Click here to expand the rendered result...</summary>
<a href="https://github.com/coveooss/json-schema-for-humans/blob/master/docs/examples/examples_md_default/ref_with_tabs.md" target="_blank">Open it in github</a>

[examples/examples_md_default/ref_with_tabs.md](examples/examples_md_default/ref_with_tabs.md ':include')
</details>


<details>
<summary>Markdown with badges template - Click here to expand the rendered result...</summary>
<a href="https://github.com/coveooss/json-schema-for-humans/blob/master/docs/examples/examples_md_with_badges/ref_with_tabs.md" target="_blank">Open it in github</a>

[examples/examples_md_with_badges/ref_with_tabs.md](examples/examples_md_with_badges/ref_with_tabs.md ':include')
</details>


<details>
<summary>Nested Markdown without badges template - Click here to expand the rendered result...</summary>
<a href="https://github.com/coveooss/json-schema-for-humans/blob/master/docs/examples/examples_md_nested_default/ref_with_tabs.md" target="_blank">Open it in github</a>

[examples/examples_md_nested_default/ref_with_tabs.md](examples/examples_md_nested_default/ref_with_tabs.md ':include')
</details>


<details>
<summary>Nested Markdown with badges template - Click here to expand the rendered result...</summary>
<a href="https://github.com/coveooss/json-schema-for-humans/blob/master/docs/examples/examples_md_nested_with_badges/ref_with_tabs.md" target="_blank">Open it in github</a>

[examples/examples_md_nested_with_badges/ref_with_tabs.md](examples/examples_md_nested_with_badges/ref_with_tabs.md ':include')
</details>

## --reference_int--
### reference_int

Expand Down
262 changes: 262 additions & 0 deletions docs/examples/cases/ref_with_tabs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
{
"$schema": "http:https://json-schema.org/draft-07/schema#",
"$id": "test.schema.json",
"type": "object",
"properties": {
"objectA": {
"type": "object",
"properties": {
"signature": {
"$ref": "#/definitions/signature",
"title": "Signature"
}
}
},
"objectB": {
"type": "object",
"properties": {
"signature": {
"$ref": "#/definitions/signature",
"title": "Signature"
}
}
}
},
"definitions": {
"signature": {
"type": "object",
"title": "Signature",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"signers": {
"type": "array",
"title": "Signature",
"description": "Unique top level property for Multiple Signatures. (multisignature)",
"additionalItems": false,
"items": {"$ref": "#/definitions/signer"}
}
}
},
{
"additionalProperties": false,
"properties": {
"chain": {
"type": "array",
"title": "Signature",
"description": "Unique top level property for Signature Chains. (signaturechain)",
"additionalItems": false,
"items": {"$ref": "#/definitions/signer"}
}
}
},
{
"title": "Signature",
"description": "Unique top level property for simple signatures. (signaturecore)",
"$ref": "#/definitions/signer"
}
]
},
"signer": {
"type": "object",
"title": "Signature",
"required": [
"algorithm",
"value"
],
"additionalProperties": false,
"properties": {
"algorithm": {
"oneOf": [
{
"type": "string",
"title": "Algorithm",
"description": "Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of \"EdDSA\".",
"enum": [
"RS256",
"RS384",
"RS512",
"PS256",
"PS384",
"PS512",
"ES256",
"ES384",
"ES512",
"Ed25519",
"Ed448",
"HS256",
"HS384",
"HS512"
]
},
{
"type": "string",
"title": "Algorithm",
"description": "Signature algorithm. Note: If proprietary signature algorithms are added, they must be expressed as URIs.",
"format": "uri"
}
]
},
"keyId": {
"type": "string",
"title": "Key ID",
"description": "Optional. Application specific string identifying the signature key."
},
"publicKey": {
"title": "Public key",
"description": "Optional. Public key object.",
"$ref": "#/definitions/publicKey"
},
"certificatePath": {
"type": "array",
"title": "Certificate path",
"description": "Optional. Sorted array of X.509 [RFC5280] certificates, where the first element must contain the signature certificate. The certificate path must be contiguous but is not required to be complete.",
"additionalItems": false,
"items": {
"type": "string"
}
},
"excludes": {
"type": "array",
"title": "Excludes",
"description": "Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the \"excludes\" property itself, must also be excluded from the signature process. Since both the \"excludes\" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.",
"additionalItems": false,
"items": {
"type": "string"
}
},
"value": {
"type": "string",
"title": "Signature",
"description": "The signature data. Note that the binary representation must follow the JWA [RFC7518] specifications."
}
}
},
"keyType": {
"type": "string",
"title": "Key type",
"description": "Key type indicator.",
"enum": [
"EC",
"OKP",
"RSA"
]
},
"publicKey": {
"title": "Public key",
"description": "Optional. Public key object.",
"type": "object",
"required": [
"kty"
],
"additionalProperties": true,
"properties": {
"kty": {
"$ref": "#/definitions/keyType"
}
},
"allOf": [
{
"if": {
"properties": { "kty": { "const": "EC" } }
},
"then": {
"required": [
"kty",
"crv",
"x",
"y"
],
"additionalProperties": false,
"properties": {
"kty": {
"$ref": "#/definitions/keyType"
},
"crv": {
"type": "string",
"title": "Curve name",
"description": "EC curve name.",
"enum": [
"P-256",
"P-384",
"P-521"
]
},
"x": {
"type": "string",
"title": "Coordinate",
"description": "EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-521\", the decoded argument must be 66 bytes."
},
"y": {
"type": "string",
"title": "Coordinate",
"description": "EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-256\", the decoded argument must be 32 bytes."
}
}
}
},
{
"if": {
"properties": { "kty": { "const": "OKP" } }
},
"then": {
"required": [
"kty",
"crv",
"x"
],
"additionalProperties": false,
"properties": {
"kty": {
"$ref": "#/definitions/keyType"
},
"crv": {
"type": "string",
"title": "Curve name",
"description": "EdDSA curve name.",
"enum": [
"Ed25519",
"Ed448"
]
},
"x": {
"type": "string",
"title": "Coordinate",
"description": "EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"Ed25519\", the decoded argument must be 32 bytes."
}
}
}
},
{
"if": {
"properties": { "kty": { "const": "RSA" } }
},
"then": {
"required": [
"kty",
"n",
"e"
],
"additionalProperties": false,
"properties": {
"kty": {
"$ref": "#/definitions/keyType"
},
"n": {
"type": "string",
"title": "Modulus",
"description": "RSA modulus."
},
"e": {
"type": "string",
"title": "Exponent",
"description": "RSA exponent."
}
}
}
}
]
}
}
}
Loading

0 comments on commit 40104da

Please sign in to comment.