-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(api): OpenAPI spec update via Stainless API (#13) * feat(api): OpenAPI spec update via Stainless API (#15) * release: 0.1.0-alpha.6 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
- Loading branch information
1 parent
1974ab6
commit 787392e
Showing
26 changed files
with
221 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
node_modules | ||
yarn-error.log | ||
codegen.log | ||
Brewfile.lock.json | ||
dist | ||
/deno | ||
/*.tgz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.1.0-alpha.5" | ||
".": "0.1.0-alpha.6" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
configured_endpoints: 1 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-7e044297a8d3c5c64964532d19e0667b059ef5a121cf3c1e64b806eec55e0767.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brew "node" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Security Policy | ||
|
||
## Reporting Security Issues | ||
|
||
This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken. | ||
|
||
To report a security issue, please contact the Stainless team at [email protected]. | ||
|
||
## Responsible Disclosure | ||
|
||
We appreciate the efforts of security researchers and individuals who help us maintain the security of | ||
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible | ||
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue | ||
before making any information public. | ||
|
||
## Reporting Non-SDK Related Security Issues | ||
|
||
If you encounter security issues that are not directly related to SDKs but pertain to the services | ||
or products provided by Riza please follow the respective company's security reporting guidelines. | ||
|
||
### Riza Terms and Policies | ||
|
||
Please contact [email protected] for any questions or concerns regarding security of our services. | ||
|
||
--- | ||
|
||
Thank you for helping us keep the SDKs and systems they interact with secure. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@riza-io/api", | ||
"version": "0.1.0-alpha.5", | ||
"version": "0.1.0-alpha.6", | ||
"description": "The official TypeScript library for the Riza API", | ||
"author": "Riza <[email protected]>", | ||
"types": "dist/index.d.ts", | ||
|
@@ -14,14 +14,14 @@ | |
], | ||
"private": false, | ||
"scripts": { | ||
"test": "bin/check-test-server && yarn jest", | ||
"build": "bash ./build", | ||
"test": "./scripts/test", | ||
"build": "./scripts/build", | ||
"prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1", | ||
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1", | ||
"format": "prettier --write --cache --cache-strategy metadata . !dist", | ||
"prepare": "if ./scripts/check-is-in-git-install.sh; then npm run build; fi", | ||
"prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build; fi", | ||
"tsn": "ts-node -r tsconfig-paths/register", | ||
"lint": "eslint --ext ts,js .", | ||
"lint": "./scripts/lint", | ||
"fix": "eslint --fix --ext ts,js ." | ||
}, | ||
"dependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then | ||
brew bundle check >/dev/null 2>&1 || { | ||
echo "==> Installing Homebrew dependencies…" | ||
brew bundle | ||
} | ||
fi | ||
|
||
echo "==> Installing Node dependencies…" | ||
|
||
PACKAGE_MANAGER=$(command -v yarn >/dev/null 2>&1 && echo "yarn" || echo "npm") | ||
|
||
$PACKAGE_MANAGER install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
echo "==> Running eslint --fix" | ||
./node_modules/.bin/eslint --fix --ext ts,js . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
echo "==> Running eslint" | ||
./node_modules/.bin/eslint --ext ts,js . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
if [[ -n "$1" && "$1" != '--'* ]]; then | ||
URL="$1" | ||
shift | ||
else | ||
URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" | ||
fi | ||
|
||
# Check if the URL is empty | ||
if [ -z "$URL" ]; then | ||
echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" | ||
exit 1 | ||
fi | ||
|
||
echo "==> Starting mock server with URL ${URL}" | ||
|
||
# Run prism mock on the given spec | ||
if [ "$1" == "--daemon" ]; then | ||
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log & | ||
|
||
# Wait for server to come online | ||
echo -n "Waiting for server" | ||
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do | ||
echo -n "." | ||
sleep 0.1 | ||
done | ||
|
||
if grep -q "✖ fatal" ".prism.log"; then | ||
cat .prism.log | ||
exit 1 | ||
fi | ||
|
||
echo | ||
else | ||
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
YELLOW='\033[0;33m' | ||
NC='\033[0m' # No Color | ||
|
||
function prism_is_running() { | ||
curl --silent "http://localhost:4010" >/dev/null 2>&1 | ||
} | ||
|
||
kill_server_on_port() { | ||
pids=$(lsof -t -i tcp:"$1" || echo "") | ||
if [ "$pids" != "" ]; then | ||
kill "$pids" | ||
echo "Stopped $pids." | ||
fi | ||
} | ||
|
||
function is_overriding_api_base_url() { | ||
[ -n "$TEST_API_BASE_URL" ] | ||
} | ||
|
||
if ! is_overriding_api_base_url && ! prism_is_running ; then | ||
# When we exit this script, make sure to kill the background mock server process | ||
trap 'kill_server_on_port 4010' EXIT | ||
|
||
# Start the dev server | ||
./scripts/mock --daemon | ||
fi | ||
|
||
if is_overriding_api_base_url ; then | ||
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" | ||
echo | ||
elif ! prism_is_running ; then | ||
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" | ||
echo -e "running against your OpenAPI spec." | ||
echo | ||
echo -e "To run the server, pass in the path or url of your OpenAPI" | ||
echo -e "spec to the prism command:" | ||
echo | ||
echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" | ||
echo | ||
|
||
exit 1 | ||
else | ||
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" | ||
echo | ||
fi | ||
|
||
echo "==> Running tests" | ||
./node_modules/.bin/jest "$@" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.