Skip to content

Commit

Permalink
feat(docs): audience filters in docs.yml (#4851)
Browse files Browse the repository at this point in the history
* feat: audience filters in docs.yml

* fix: compile breaks in the docs-resolver

* add all-audiences-must-be-declared rule

* fix tests

* update jsonschema

* fix: compile breaks

* add changelog entry
  • Loading branch information
abvthecity authored Oct 24, 2024
1 parent d3692f7 commit 1cab88d
Show file tree
Hide file tree
Showing 71 changed files with 1,168 additions and 676 deletions.
142 changes: 119 additions & 23 deletions docs-yml.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@
}
]
},
"audiences": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/docs.AudienceId"
}
},
{
"type": "null"
}
]
},
"tabs": {
"oneOf": [
{
Expand Down Expand Up @@ -258,19 +271,6 @@
}
]
},
"docs.AudiencesConfig": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"docs.GithubEditThisPageConfig": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -339,16 +339,6 @@
}
]
},
"audiences": {
"oneOf": [
{
"$ref": "#/definitions/docs.AudiencesConfig"
},
{
"type": "null"
}
]
},
"private": {
"oneOf": [
{
Expand Down Expand Up @@ -501,12 +491,38 @@
],
"additionalProperties": false
},
"docs.AudienceId": {
"type": "string"
},
"docs.Audience": {
"anyOf": [
{
"$ref": "#/definitions/docs.AudienceId"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/docs.AudienceId"
}
}
]
},
"docs.ChangelogFolderRelativePath": {
"type": "string"
},
"docs.TabConfig": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"display-name": {
"type": "string"
},
Expand Down Expand Up @@ -588,6 +604,16 @@
"docs.VersionConfig": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"display-name": {
"type": "string"
},
Expand Down Expand Up @@ -624,6 +650,16 @@
"docs.PageConfiguration": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"page": {
"type": "string"
},
Expand Down Expand Up @@ -670,6 +706,16 @@
"docs.SectionConfiguration": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"section": {
"type": "string"
},
Expand Down Expand Up @@ -886,6 +932,16 @@
"docs.ApiReferencePackageConfigurationWithOptions": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"title": {
"oneOf": [
{
Expand Down Expand Up @@ -988,6 +1044,16 @@
"docs.ApiReferenceSectionConfiguration": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"section": {
"type": "string"
},
Expand Down Expand Up @@ -1086,6 +1152,16 @@
"docs.ApiReferenceEndpointConfiguration": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"endpoint": {
"type": "string"
},
Expand Down Expand Up @@ -1201,6 +1277,16 @@
"docs.ApiReferenceConfiguration": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"api": {
"type": "string"
},
Expand Down Expand Up @@ -1359,6 +1445,16 @@
"docs.ChangelogConfiguration": {
"type": "object",
"properties": {
"audience": {
"oneOf": [
{
"$ref": "#/definitions/docs.Audience"
},
{
"type": "null"
}
]
},
"changelog": {
"$ref": "#/definitions/docs.ChangelogFolderRelativePath"
},
Expand Down
Loading

0 comments on commit 1cab88d

Please sign in to comment.