Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,863 changes: 0 additions & 2,863 deletions docs collection.postman_collection_1.json

This file was deleted.

1,988 changes: 763 additions & 1,225 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,5 @@
"redoc-cli": "^0.9.12",
"yaml": "^1.10.0"
},
"devDependencies": {},
"overrides": {
"redoc": {
"styled-components": "^5.2.0"
}
}
"devDependencies": {}
}
751 changes: 751 additions & 0 deletions redoc-static.html

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@
set -e
mkdir -p docs/specs docs/style
echo -n "Building Documentation... "
node scripts/normalize-mintlify-openapi.js specs/external-api.yml
npm run redoc
for attempt in {1..30}; do
if [[ -f redoc-static.html ]]; then
break
fi
sleep 1
done
if [[ ! -f redoc-static.html ]]; then
echo "Redoc bundle was not generated"
exit 1
fi
npm run convert:external:api
npm run modify:external:api
RESULT=$?
Expand Down
23 changes: 11 additions & 12 deletions scripts/modify-pm-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Modify PM Collection
* + adds variables
* + variables' values read from openAPI spec yaml file
*
*
* Specify optionally:
* -i PM Collection to be modified
* -a openAPI spec yaml file
Expand All @@ -21,21 +21,20 @@ const apiSpec = YAML.parse(fs.readFileSync(apiSpecFile).toString());

console.log("Reading auths from examples in " + apiSpecFile);

// The OpenAPI definition now keeps request samples with their operations rather
// than in legacy named component schemas. Read the current Generate Hash sample
// and retain Postman variables for values a user supplies at runtime.
const hashExamples =
apiSpec.paths?.["/api/v2/encrypt/hashs"]?.post?.requestBody?.content?.[
"application/json"
]?.examples;
const hashExample = hashExamples && Object.values(hashExamples)[0]?.value;
const specPK = hashExample?.publicKey || "{{publicKey}}";
const specToken = "{{BearerToken}}";
var specToken, specPK;
try {
specPK = apiSpec.components.schemas.CaptureRequest.example.publicKey;
specToken =
apiSpec.components.schemas.GenerateEncryptedSecretKeyResponse.example.data
.EncrytedSecKey.encryptedKey;
} catch (err) {
throw err;
}

console.log("Token: " + specToken);
console.log("Username (Public Key): " + specPK);

console.log("Reading converted PM Collection " + pmInputFile);
console.log("Reading converted PM Collection " + pmInputFile)
var convertedPMC = JSON.parse(fs.readFileSync(pmInputFile).toString());

convertedPMC.variable = [
Expand Down
143 changes: 0 additions & 143 deletions scripts/normalize-mintlify-openapi.js

This file was deleted.

Loading
Loading