diff --git a/beacon_api/schemas/query.json b/beacon_api/schemas/query.json index c86b78a1..24c71f18 100644 --- a/beacon_api/schemas/query.json +++ b/beacon_api/schemas/query.json @@ -107,7 +107,12 @@ "oneOf": [{ "required": [ "variantType" - ] + ], + "not": { + "required": [ + "mateName" + ] + } }, { "required": [ @@ -117,7 +122,24 @@ { "required": [ "mateName" - ] + ], + "not": { + "required": [ + "variantType" + ] + } + }, + { + "required": [ + "mateName", + "variantType" + ], + "properties": { + "variantType": { + "type": "string", + "enum": ["BND"] + } + } } ] }, { diff --git a/docs/optionals.rst b/docs/optionals.rst index 69fcf88b..42acf8d4 100644 --- a/docs/optionals.rst +++ b/docs/optionals.rst @@ -106,6 +106,10 @@ Currently querying for a ``BND`` using ``startMin``, ``startMax`` and ``endMin`` with ``variantType=BND`` has the response illustrated below. Fixed ``start`` and ``end`` can be utilised, as well as ``mateName`` as depicted above. +.. note:: By default when using ``mateName``, ``variantType`` is implicit ``BND``, + but it can also be set in an explicit manner using both ``mateName`` and + ``variantType=BND`` in a query. + .. code-block:: javascript {