Skip to content

Commit c03786b

Browse files
committed
wip
1 parent 1e46df3 commit c03786b

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package optional
22

3+
#field_without_default:
4+
"yes" |
5+
"optional" |
6+
"excluded"
7+
38
// Is a field Required, Optional or Excluded/Unused
4-
#field:
5-
"yes" |
6-
"optional" |
7-
*"excluded"
9+
#field: #field_without_default | *"excluded"

specs/definitions/signed_docs/cose_headers.cue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package signed_docs
55

66
import (
77
"list"
8-
// "github.com/input-output-hk/catalyst-libs/specs/generic:optional"
8+
"github.com/input-output-hk/catalyst-libs/specs/generic:optional"
99
"github.com/input-output-hk/catalyst-libs/specs/media_types"
1010
)
1111

@@ -51,8 +51,9 @@ cose: headerFormats: #metadataFormats & {
5151
coseLabel: int | string
5252
description: string
5353
format: #coseHeaderTypesConstraint
54-
required: "yes" | "optional" | "excluded"
55-
54+
//required: "yes" | "optional" | "excluded"
55+
required: optional.#field_without_default
56+
5657
if required != "excluded" {
5758
if format == "Media Type" {
5859
value: media_types.#contentType | [...media_types.#contentType]

0 commit comments

Comments
 (0)