Skip to content

Commit

Permalink
Fix build, add test for schema
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mueller committed Jan 7, 2025
1 parent 60c370c commit 0c1664a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-compiled-scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ jobs:
# git diff --quiet implies --exit-code
run: |
cabal run export-smart-tokens
cabal run write-openapi-schema -- generated/openapi/schema.json
git diff --quiet
20 changes: 10 additions & 10 deletions generated/openapi/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
},
"openapi": "3.0.0",
"paths": {
"/healthcheck": {
"/api/v1/healthcheck": {
"get": {
"description": "Is the server alive?",
"responses": {
Expand All @@ -226,7 +226,7 @@
}
}
},
"/query/address/{address}": {
"/api/v1/query/address/{address}": {
"get": {
"description": "The user's receiving address for programmable tokens",
"parameters": [
Expand Down Expand Up @@ -258,7 +258,7 @@
}
}
},
"/query/all-funds": {
"/api/v1/query/all-funds": {
"get": {
"description": "Total value of all programmable tokens",
"responses": {
Expand All @@ -275,7 +275,7 @@
}
}
},
"/query/blacklist/{address}": {
"/api/v1/query/blacklist/{address}": {
"get": {
"description": "The list of addresses that have been blacklisted",
"parameters": [
Expand Down Expand Up @@ -310,7 +310,7 @@
}
}
},
"/query/global-params": {
"/api/v1/query/global-params": {
"get": {
"description": "The UTxO with the global parameters",
"responses": {
Expand All @@ -327,7 +327,7 @@
}
}
},
"/query/user-funds/{address}": {
"/api/v1/query/user-funds/{address}": {
"get": {
"description": "Total value locked in programmable token outputs addressed to the user",
"parameters": [
Expand Down Expand Up @@ -359,7 +359,7 @@
}
}
},
"/tx/programmable-token/blacklist": {
"/api/v1/tx/programmable-token/blacklist": {
"post": {
"description": "Add a credential to the blacklist",
"requestBody": {
Expand Down Expand Up @@ -388,7 +388,7 @@
}
}
},
"/tx/programmable-token/issue": {
"/api/v1/tx/programmable-token/issue": {
"post": {
"description": "Create some programmable tokens",
"requestBody": {
Expand Down Expand Up @@ -417,7 +417,7 @@
}
}
},
"/tx/programmable-token/seize": {
"/api/v1/tx/programmable-token/seize": {
"post": {
"description": "Seize a user's funds",
"requestBody": {
Expand Down Expand Up @@ -446,7 +446,7 @@
}
}
},
"/tx/programmable-token/transfer": {
"/api/v1/tx/programmable-token/transfer": {
"post": {
"description": "Transfer programmable tokens from one address to another",
"requestBody": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Wst/Server/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import SmartTokens.Types.ProtocolParams (ProgrammableLogicGlobalParams)
import Wst.JSON.Utils qualified as JSON
import Wst.Offchain.Query (UTxODat (..))

type APIInEra = "api" >: "v1" :> API C.ConwayEra
type APIInEra = "api" :> "v1" :> API C.ConwayEra

newtype TextEnvelopeJSON a = TextEnvelopeJSON{ unTextEnvelopeJSON :: a }

Expand Down

0 comments on commit 0c1664a

Please sign in to comment.