diff --git a/typespec-ccf/main.tsp b/typespec-ccf/main.tsp index 0135d21cc032..00263cc48b66 100644 --- a/typespec-ccf/main.tsp +++ b/typespec-ccf/main.tsp @@ -23,7 +23,7 @@ model GetCommit { } model MemberIdToBase64 { - @format("base64") value: string; + @format("byte") value: string; } model StringToBase64 is MemberIdToBase64; @@ -38,18 +38,18 @@ enum MDType { model SignedReq { keyId: string; - @format("base64") req: string; + @format("byte") req: string; md: MDType; - @format("base64") requestBody: string; - @format("base64") sig: string; + @format("byte") requestBody: string; + @format("byte") sig: string; } model MemberIdToSignedReq is SignedReq; model JSRuntimeOptions { - maxExecutionTimeInMs: uint64; - maxHeapBytes: uint64; - maxStackBytes: uint64; + @minValue(0) @maxValue(18446744073709551615) maxExecutionTimeInMs: int64; + @minValue(0) @maxValue(18446744073709551615) maxHeapBytes: int64; + @minValue(0) @maxValue(18446744073709551615) maxStackBytes: int64; } enum JwtIssuerKeyFilter { @@ -71,7 +71,7 @@ model JwtIssuerMetadata { model StringToJwtIssuerMetadata is JwtIssuerMetadata; model MemberAck { - @format("base64") codeSign1Req?: string; + @format("byte") codeSign1Req?: string; signedReq?: SignedReq; stateDigest: StateDigest; } @@ -79,7 +79,7 @@ model MemberAck { model MemberIdToMemberAck is MemberAck; model Pem { - @format("pem") pemValue: string; + pemValue: string; } model MemberIdToPem { @@ -124,9 +124,9 @@ enum QuoteFormat { } model QuoteInfo { - @format("base64") endorsements: string; + @format("byte") endorsements: string; format: QuoteFormat; - @format("base64") quote: string; + @format("byte") quote: string; } enum AppProtocol { @@ -157,10 +157,10 @@ model Endorsement { model HttpConfiguration { @pattern("^[0-9]+(B|KB|MB|GB|TB|PB)?$") initialWindowSize: string; @pattern("^[0-9]+(B|KB|MB|GB|TB|PB)?$") maxBodySize: string; - @minValue(0) @maxValue(18446744073709551615) maxConcurrentStreams: uint64; + @minValue(0) @maxValue(18446744073709551615) maxConcurrentStreams: int64; @pattern("^[0-9]+(B|KB|MB|GB|TB|PB)?$") maxFrameSize: string; @pattern("^[0-9]+(B|KB|MB|GB|TB|PB)?$") maxHeaderSize: string; - @minValue(0) @maxValue(4294967295) maxHeadersCount: uint32; + @minValue(0) @maxValue(4294967295) maxHeadersCount: int32; } model NodeToNodeInterface { @@ -169,8 +169,8 @@ model NodeToNodeInterface { bindAddress: string; endorsement?: Endorsement; httpConfig?: HttpConfiguration; - @minValue(0) @maxValue(18446744073709551615) maxOpenSessionsHard?: uint64; - @minValue(0) @maxValue(18446744073709551615) maxOpenSessionsSoft?: uint64; + @minValue(0) @maxValue(18446744073709551615) maxOpenSessionsHard?: int64; + @minValue(0) @maxValue(18446744073709551615) maxOpenSessionsSoft?: int64; protocol?: string; publishedAddress?: string; } @@ -183,7 +183,7 @@ model NodeInfo { certificateSigningRequest?: Pem; codeDigest?: string; encryptionPublicKey: Pem; - ledgetSecretSeqno?: uint64; + @minValue(0) @maxValue(18446744073709551615) ledgerSecretSeqno?: int64; nodeData?: Json; nodeToNodeInterface: NodeToNodeInterface; publicKey?: Pem; @@ -215,7 +215,7 @@ model ProposalInfo { ballots: string; failure?: Failure; finalVotes?: boolean; - @format("hex") @pattern("^[a-f0-9]{64}$") proposerId: string; + @pattern("^[a-f0-9]{64}$") proposerId: string; state: ProposalState; voteFailures: MemberIdToFailure; } @@ -236,11 +236,11 @@ enum reconfigurationType { model ServiceConfiguration { consensus: ConsensusType; - maxNodeCertValidityDays?: uint64; - maxServiceCertValidityDays?: uint64; - recentCoseProposalsWindowSize?: uint64; + @minValue(0) @maxValue(18446744073709551615) maxNodeCertValidityDays?: int64; + @minValue(0) @maxValue(18446744073709551615) maxServiceCertValidityDays?: int64; + @minValue(0) @maxValue(18446744073709551615) recentCoseProposalsWindowSize?: int64; reconfigurationType?: reconfigurationType; - recoveryThreshold: uint64; + @minValue(0) @maxValue(18446744073709551615) recoveryThreshold: int64; } enum ServiceStatus { @@ -253,8 +253,8 @@ enum ServiceStatus { model ServiceInfo { cert: Pem; @pattern("^[0-9]+\\.[0-9]+$") currentServiceCreateTxId?: string; - prevServiceIdentityVersion?: uint64; - recoveryCount?: uint64; + @minValue(0) @maxValue(18446744073709551615) prevServiceIdentityVersion?: int64; + @minValue(0) @maxValue(18446744073709551615) recoveryCount?: int64; serviceData?: Json; status: ServiceStatus; } @@ -277,10 +277,10 @@ model Proposal { } model ProposalInfoSummary { - ballotCount: uint64; + @minValue(0) @maxValue(18446744073709551615) ballotCount: int64; failure?: Failure; proposalId: string; - @format("hex") @pattern("^[a-f0-9]{64}$") proposerId: string; + @pattern("^[a-f0-9]{64}$") proposerId: string; state: ProposalState; voteFailures?: MemberIdToFailure; votes?: boolean; @@ -319,7 +319,7 @@ enum CodeStatusValues { } model CodeDetails { - @format("hex") @pattern("^[a-f0-9]+$") codeDigest: string; + @pattern("^[a-f0-9]+$") codeDigest: string; codeStatus: CodeStatusValues; } @@ -328,7 +328,7 @@ model CodeDigestToCodeStatus { } model Sha256DigestToStringMap { - @format("hex") @pattern("^[a-f0-9]{32}$") digest: string; + @pattern("^[a-f0-9]{32}$") digest: string; value: string; } @@ -339,12 +339,14 @@ model Sha256DigestToString { @route("/gov/ack") @summary("Provide a member endorsement of a service state digest") @post op ack(@body state_digest: StateDigest): { + @header("x-ms-ccf-transaction-id") transactionID: string; @statusCode statusCode: 204; }; @route("/gov/ack/update_state_digest") @summary("Update and fetch a service state digest, for the purpose of member endorsement") @post op updateStateDigest(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body stateDigest: StateDigest; }; @@ -352,194 +354,231 @@ model Sha256DigestToString { @doc("Latest transaction ID that has been committed on the service") @summary("Current commit level") @get op commit(@query view_history?: boolean, @query view_history_since?: int64): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body govCommit: GetCommit; }; @route("/gov/kv/constitution") @get op getConstitution(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body constitution: string; }; // TODO: @extension("x-ccf-forwarding", true), @defaultresponse -- decorators don't work @route("/gov/kv/cose_history") @get op getCoseHistory(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body coseHistory: StringToBase64; }; @route("/gov/kv/cose_recent_proposals") @get op getCoseRecentProposals(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body coseRecentProposals: string; }; @route("/gov/kv/history") @get op getHistory(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body history: MemberIdToSignedReq; }; @route("/gov/kv/js_runtime_options") @get op getJSRuntimeOptions(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body jsRuntimeOptions: JSRuntimeOptions; }; @route("/gov/kv/jwt/issuers") @get op getJwtIssuers(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body jwtIssuers: StringToJwtIssuerMetadata; }; @route("/gov/kv/jwt/public_signing_key_issuer") @get op getJwtPublicSigningKeyIssuer(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body jwtPublicSigningKeyIssuer: string; }; @route("/gov/kv/jwt/public_signing_keys") @get op getJwtPublicSigningKeys(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body jwtPublicSigningKeys: StringToBase64; }; @route("/gov/kv/members/acks") @get op getMembersAcks(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body membersAcks: MemberIdToMemberAck; }; @route("/gov/kv/members/certs") @get op getMembersCerts(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body membersCerts: MemberIdToPem; }; @route("/gov/kv/members/encryption_public_keys") @get op getMembersEncryptionPublicKeys(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body membersEncryptionPublicKeys: MemberIdToPem; }; @route("/gov/kv/members/info") @get op getMembersInfo(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body membersInfo: MemberIdToMemberDetails; }; @route("/gov/kv/modules") @get op getModules(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body modules: string; }; @route("/gov/kv/modules_quickjs_bytecode") @get op getModulesQuickJSBytecode(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body modulesQuickJSBytecode: StringToBase64; }; @route("/gov/kv/modules_quickjs_version") @get op getModulesQuickJSVersion(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body modulesQuickJSVersion: string; }; @route("/gov/kv/nodes/code_ids") @get op getNodeCodeIds(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body nodeCodeIds: CodeDigestToCodeStatus; }; @route("/gov/kv/nodes/endorsed_certificates") @get op getNodesEndorsedCertificates(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body nodesEndorsedCertificates: NodeIdToPem; }; @route("/gov/kv/nodes/info") @get op getNodesInfo(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body nodesInfo: NodeIdToNodeInfo; }; @route("/gov/kv/nodes/snp/host_data") @get op getNodeSnpHostData(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body nodesSnpHostData: Sha256DigestToString; }; @route("/gov/kv/nodes/snp/measurements") @get op getNodeSnpMeasurements(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body nodesSnpMeasurements: CodeDigestToCodeStatus; }; @route("/gov/kv/proposals") @get op getProposals(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body proposals: StringToBase64; }; @route("/gov/kv/proposals_info") @get op getProposalsInfo(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body proposalsInfo: StringToProposalInfo; }; @route("/gov/kv/service/acme_certificates") @get op getServiceAcmeCertificates(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body serviceAcmeCertificates: StringToPem; }; @route("/gov/kv/service/config") @get op getServiceConfig(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body serviceConfig: ServiceConfiguration; }; @route("/gov/kv/service/info") @get op getServiceInfo(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body serviceInfo: ServiceInfo; }; @route("/gov/kv/service/previous_service_identity") @get op getServicePreviousServiceIdentity(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body servicePreviousServiceIdentity: Pem; }; @route("/gov/kv/tls/ca_cert_bundles") @get op getTlsCaCertBundles(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body tlsCaCertBundles: string; }; @route("/gov/kv/users/certs") @get op getUsersCerts(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body usersCerts: UserIdToPem; }; @route("/gov/kv/users/info") @get op getUsersInfo(): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body usersInfo: UserDetails; }; @route("/gov/proposals") -namespace proposal { +namespace proposals { @summary("Proposed changes to the service pending resolution") - @get op alaproposals(): { - @body proposals: StringToProposalInfo + @get op allProposals(): { + @header("x-ms-ccf-transaction-id") transactionID: string; + @body proposals: StringToProposalInfo }; @summary("Submit a proposed change to the service") @post op proposalInfo(@body proposal: Proposal): { - @body proposalInfoDetail: ProposalInfoSummary; + @header("x-ms-ccf-transaction-id") transactionID: string; + @body proposalInfoDetail: ProposalInfoSummary; }; } @route("/gov/proposals/{proposal_id}") @summary("Information about a proposed change to the service") @get op getProposalId(@path proposal_id: string): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body proposalInfoDetail: ProposalInfo; }; @route("/gov/proposals/{proposal_id}/actions") @summary("Actions contained in a proposed change to the service") @get op getProposalIdActions(@path proposal_id: string): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body proposalActions: Proposal; }; @route("/gov/proposals/{proposal_id}/ballots") @summary("Ballots submitted against a proposed change to the service") @post op postProposalIdBallots(@path proposal_id: string, @body ballot: Ballot): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body ballotInfo: ProposalInfoSummary; }; @route("/gov/proposals/{proposal_id}/ballots/{member_id}") @summary("Ballot for a given member about a proposed change to the service") @get op getMemberIdBallot(@path proposal_id: string, @path member_id: string): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body ballot: Ballot; }; @route("/gov/proposals/{proposal_id}/withdraw") @summary("Withdraw a proposed change to the service") @post op postProposalIdWithdraw(@path proposal_id: string): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body proposalInfoDetail: ProposalInfo; }; @@ -553,12 +592,14 @@ namespace proposal { @route("/gov/recovery_share") @summary("Provide a recovery share for the purpose of completing a service recovery") @post op postRecoveryShare(@body recoveryShare: SubmitRecoveryShareIn): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body recoveryShare: SubmitRecoveryShareOut; }; @route("/gov/encrypted_recovery_share/{member_id}") @summary("A member's encrypted recovery share") @get op getEncryptedRecoveryShare(@path member_id: string): { + @header("x-ms-ccf-transaction-id") transactionID: string; @body recoveryShare: GetEncryptedRecoveryShare; }; diff --git a/typespec-ccf/tsp-output/@azure-tools/typespec-autorest/openapi.json b/typespec-ccf/tsp-output/@azure-tools/typespec-autorest/openapi.json index 25af691209cb..2f49305591d3 100644 --- a/typespec-ccf/tsp-output/@azure-tools/typespec-autorest/openapi.json +++ b/typespec-ccf/tsp-output/@azure-tools/typespec-autorest/openapi.json @@ -30,7 +30,12 @@ ], "responses": { "204": { - "description": "There is no content to send for this request, but the headers may be useful. " + "description": "There is no content to send for this request, but the headers may be useful. ", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + } } } } @@ -43,6 +48,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StateDigest" } @@ -73,6 +83,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/GetCommit" } @@ -95,6 +110,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/GetEncryptedRecoveryShare" } @@ -109,6 +129,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "type": "string" } @@ -123,6 +148,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StringToBase64" } @@ -137,6 +167,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "type": "string" } @@ -151,6 +186,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/MemberIdToSignedReq" } @@ -165,6 +205,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/JSRuntimeOptions" } @@ -179,6 +224,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StringToJwtIssuerMetadata" } @@ -193,6 +243,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "type": "string" } @@ -207,6 +262,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StringToBase64" } @@ -221,6 +281,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/MemberIdToMemberAck" } @@ -235,6 +300,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/MemberIdToPem" } @@ -249,6 +319,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/MemberIdToPem" } @@ -263,6 +338,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/MemberIdToMemberDetails" } @@ -277,6 +357,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "type": "string" } @@ -291,6 +376,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StringToBase64" } @@ -305,6 +395,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "type": "string" } @@ -319,6 +414,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/CodeDigestToCodeStatus" } @@ -333,6 +433,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/NodeIdToPem" } @@ -347,6 +452,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/NodeIdToNodeInfo" } @@ -361,6 +471,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/Sha256DigestToString" } @@ -375,6 +490,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/CodeDigestToCodeStatus" } @@ -389,6 +509,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StringToBase64" } @@ -403,6 +528,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StringToProposalInfo" } @@ -417,6 +547,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StringToPem" } @@ -431,6 +566,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/ServiceConfiguration" } @@ -445,6 +585,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/ServiceInfo" } @@ -459,6 +604,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/Pem" } @@ -473,6 +623,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "type": "string" } @@ -487,6 +642,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/UserIdToPem" } @@ -501,6 +661,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/UserDetails" } @@ -510,12 +675,17 @@ }, "/gov/proposals": { "get": { - "operationId": "Proposal_Alaproposals", + "operationId": "Proposals_AllProposals", "summary": "Proposed changes to the service pending resolution", "parameters": [], "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/StringToProposalInfo" } @@ -523,7 +693,7 @@ } }, "post": { - "operationId": "Proposal_ProposalInfo", + "operationId": "Proposals_ProposalInfo", "summary": "Submit a proposed change to the service", "parameters": [ { @@ -538,6 +708,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/ProposalInfoSummary" } @@ -560,6 +735,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/ProposalInfo" } @@ -582,6 +762,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/Proposal" } @@ -612,6 +797,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/ProposalInfoSummary" } @@ -640,6 +830,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/Ballot" } @@ -662,6 +857,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/ProposalInfo" } @@ -686,6 +886,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/Json" } @@ -710,6 +915,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/SubmitRecoveryShareOut" } @@ -733,6 +943,11 @@ "responses": { "200": { "description": "The request has succeeded.", + "headers": { + "x-ms-ccf-transaction-id": { + "type": "string" + } + }, "schema": { "$ref": "#/definitions/GetTxStatusOut" } @@ -846,7 +1061,6 @@ "properties": { "codeDigest": { "type": "string", - "format": "hex", "pattern": "^[a-f0-9]+$" }, "codeStatus": { @@ -961,7 +1175,7 @@ }, "maxConcurrentStreams": { "type": "integer", - "format": "uint64", + "format": "int64", "minimum": 0, "maximum": 18446744073709552000 }, @@ -975,7 +1189,7 @@ }, "maxHeadersCount": { "type": "integer", - "format": "uint32", + "format": "int32", "minimum": 0, "maximum": 4294967295 } @@ -994,15 +1208,21 @@ "properties": { "maxExecutionTimeInMs": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "maxHeapBytes": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "maxStackBytes": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 } }, "required": ["maxExecutionTimeInMs", "maxHeapBytes", "maxStackBytes"] @@ -1056,7 +1276,7 @@ "properties": { "codeSign1Req": { "type": "string", - "format": "base64" + "format": "byte" }, "signedReq": { "$ref": "#/definitions/SignedReq" @@ -1084,7 +1304,7 @@ "properties": { "value": { "type": "string", - "format": "base64" + "format": "byte" } }, "required": ["value"] @@ -1106,7 +1326,7 @@ "properties": { "codeSign1Req": { "type": "string", - "format": "base64" + "format": "byte" }, "signedReq": { "$ref": "#/definitions/SignedReq" @@ -1146,18 +1366,18 @@ }, "req": { "type": "string", - "format": "base64" + "format": "byte" }, "md": { "$ref": "#/definitions/MDType" }, "requestBody": { "type": "string", - "format": "base64" + "format": "byte" }, "sig": { "type": "string", - "format": "base64" + "format": "byte" } }, "required": ["keyId", "req", "md", "requestBody", "sig"] @@ -1188,9 +1408,11 @@ "encryptionPublicKey": { "$ref": "#/definitions/Pem" }, - "ledgetSecretSeqno": { + "ledgerSecretSeqno": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "nodeData": { "$ref": "#/definitions/Json" @@ -1249,9 +1471,11 @@ "encryptionPublicKey": { "$ref": "#/definitions/Pem" }, - "ledgetSecretSeqno": { + "ledgerSecretSeqno": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "nodeData": { "$ref": "#/definitions/Json" @@ -1315,13 +1539,13 @@ }, "maxOpenSessionsHard": { "type": "integer", - "format": "uint64", + "format": "int64", "minimum": 0, "maximum": 18446744073709552000 }, "maxOpenSessionsSoft": { "type": "integer", - "format": "uint64", + "format": "int64", "minimum": 0, "maximum": 18446744073709552000 }, @@ -1338,8 +1562,7 @@ "type": "object", "properties": { "pemValue": { - "type": "string", - "format": "pem" + "type": "string" } }, "required": ["pemValue"] @@ -1367,7 +1590,6 @@ }, "proposerId": { "type": "string", - "format": "hex", "pattern": "^[a-f0-9]{64}$" }, "state": { @@ -1384,7 +1606,9 @@ "properties": { "ballotCount": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "failure": { "$ref": "#/definitions/Failure" @@ -1394,7 +1618,6 @@ }, "proposerId": { "type": "string", - "format": "hex", "pattern": "^[a-f0-9]{64}$" }, "state": { @@ -1437,14 +1660,14 @@ "properties": { "endorsements": { "type": "string", - "format": "base64" + "format": "byte" }, "format": { "$ref": "#/definitions/QuoteFormat" }, "quote": { "type": "string", - "format": "base64" + "format": "byte" } }, "required": ["endorsements", "format", "quote"] @@ -1473,13 +1696,13 @@ }, "maxOpenSessionsHard": { "type": "integer", - "format": "uint64", + "format": "int64", "minimum": 0, "maximum": 18446744073709552000 }, "maxOpenSessionsSoft": { "type": "integer", - "format": "uint64", + "format": "int64", "minimum": 0, "maximum": 18446744073709552000 }, @@ -1500,22 +1723,30 @@ }, "maxNodeCertValidityDays": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "maxServiceCertValidityDays": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "recentCoseProposalsWindowSize": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "reconfigurationType": { "$ref": "#/definitions/reconfigurationType" }, "recoveryThreshold": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 } }, "required": ["consensus", "recoveryThreshold"] @@ -1532,11 +1763,15 @@ }, "prevServiceIdentityVersion": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "recoveryCount": { "type": "integer", - "format": "uint64" + "format": "int64", + "minimum": 0, + "maximum": 18446744073709552000 }, "serviceData": { "$ref": "#/definitions/Json" @@ -1574,7 +1809,6 @@ "properties": { "digest": { "type": "string", - "format": "hex", "pattern": "^[a-f0-9]{32}$" }, "value": { @@ -1591,18 +1825,18 @@ }, "req": { "type": "string", - "format": "base64" + "format": "byte" }, "md": { "$ref": "#/definitions/MDType" }, "requestBody": { "type": "string", - "format": "base64" + "format": "byte" }, "sig": { "type": "string", - "format": "base64" + "format": "byte" } }, "required": ["keyId", "req", "md", "requestBody", "sig"] @@ -1621,7 +1855,7 @@ "properties": { "value": { "type": "string", - "format": "base64" + "format": "byte" } }, "required": ["value"] @@ -1648,8 +1882,7 @@ "type": "object", "properties": { "pemValue": { - "type": "string", - "format": "pem" + "type": "string" } }, "required": ["pemValue"] @@ -1668,7 +1901,6 @@ }, "proposerId": { "type": "string", - "format": "hex", "pattern": "^[a-f0-9]{64}$" }, "state": { diff --git a/typespec-ccf/tspconfig.yaml b/typespec-ccf/tspconfig.yaml index 549102b92c8f..41f61f51d3ee 100644 --- a/typespec-ccf/tspconfig.yaml +++ b/typespec-ccf/tspconfig.yaml @@ -1,3 +1,4 @@ -# Note: uncomment this if you want TypeSpec to emit OpenAPI3 -#- '@typespec/openapi3' -- "@azure-tools/typespec-autorest" +emit: + # Note: uncomment this if you want TypeSpec to emit OpenAPI3 + #- '@typespec/openapi3' + - "@azure-tools/typespec-autorest"