File tree Expand file tree Collapse file tree
patchlogr-core/src/partition Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- export type PartitionManifest = {
2- key : string ;
3- hash : string ;
4- } ;
5-
61export type Partition = {
72 hash : string ;
83 operationKey : string ;
94} ;
105
116export type PartitionedSpec = {
7+ hash : string ;
128 metadata : Record < string , unknown > ;
139 partitions : Map < string , Partition [ ] > ;
1410} ;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export function partitionByMethod(spec: CanonicalSpec): PartitionedSpec {
1717 } ) ;
1818
1919 return {
20+ hash : createSHA256Hash ( stableStringify ( spec ) ) ,
2021 metadata : {
2122 ...spec . info ,
2223 ...spec . security ,
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export function partitionByTag(spec: CanonicalSpec): PartitionedSpec {
1919 } ) ;
2020
2121 return {
22+ hash : createSHA256Hash ( stableStringify ( spec ) ) ,
2223 metadata : {
2324 ...spec . info ,
2425 ...spec . security ,
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ export type CanonicalOperation = CanonicalOperationContract & {
188188 doc ?: CanonicalOperationDoc ;
189189} ;
190190
191- export interface CanonicalSpec {
191+ export type CanonicalSpec = {
192192 info ?: {
193193 title ?: string ;
194194 version ?: string ;
@@ -202,4 +202,4 @@ export interface CanonicalSpec {
202202 */
203203 security ?: CanonicalSecurityRequirement [ ] ;
204204 operations : Record < OperationKey , CanonicalOperation > ;
205- }
205+ } ;
You can’t perform that action at this time.
0 commit comments