From d3eba3692d51f1887444842d20132d7267719bb6 Mon Sep 17 00:00:00 2001
From: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Date: Fri, 5 Apr 2024 14:53:46 +0200
Subject: [PATCH] [prdoc] Support multiple audiences (#3990)

Closes https://github.com/paritytech/polkadot-sdk/issues/3986

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---
 docs/sdk/src/reference_docs/frame_tokens.rs |  2 +-
 prdoc/schema_user.json                      | 19 ++++++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/docs/sdk/src/reference_docs/frame_tokens.rs b/docs/sdk/src/reference_docs/frame_tokens.rs
index c9d34e2091d..1aaba78bb9b 100644
--- a/docs/sdk/src/reference_docs/frame_tokens.rs
+++ b/docs/sdk/src/reference_docs/frame_tokens.rs
@@ -87,7 +87,7 @@
 //! [`fungible::Inspect`](`frame_support::traits::fungible::Inspect`) is not some arcane knowledge
 //! that you have to know by heart or memorize. One can simply look at the list of the implementors
 //! of any trait in the Rust Doc to find all implementors (e.g.
-//! <https://paritytech.github.io/polkadot-sdk/master/frame/traits/tokens/fungible/trait.Mutate.html#implementors>),
+//! <https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/tokens/fungible/trait.Mutate.html#implementors>),
 //! or use the `rust-analyzer` `Implementations` action.
 //!
 //! ## Fungible Token Traits in FRAME
diff --git a/prdoc/schema_user.json b/prdoc/schema_user.json
index 1bd0b3b93ee..6b44b1b28df 100644
--- a/prdoc/schema_user.json
+++ b/prdoc/schema_user.json
@@ -98,6 +98,12 @@
     "$defs": {
       "audience": {
         "description": "You may pick one or more audiences and address those users with appropriate documentation, information and warning related to the PR.",
+        "oneOf": [
+          { "$ref": "#/$defs/audience_id" },
+          { "$ref": "#/$defs/audience_ids" }          
+        ]
+      },
+      "audience_id": {
         "oneOf": [
           {"const": "Node Dev",
           "title": "Node Dev",
@@ -116,6 +122,13 @@
           "description": "Anyone using the runtime. This can be a token holder or a dev writing a front end for a chain."}
         ]
       },
+      "audience_ids": {
+        "type": "array",
+        "items": {
+          "$ref": "#/$defs/audience_id"
+        },
+        "minItems": 2
+      },
       "crate": {
         "type": "object",
         "description": "You have the option here to provide a hint about a crate that has changed to help with the publishing of crates.",
@@ -209,7 +222,11 @@
             "description": "Description of the change",
             "type": "string"
           }
-        }
+        },
+        "required": [
+          "audience",
+          "description"
+        ]
       },
       "array_of_strings": {
         "description": "An array of strings that can be empty",
-- 
GitLab