Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruv-singhal-github committed Jul 25, 2024
1 parent 938e356 commit 9e0a0d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</f:entry>
<f:entry name="traceableServer" title="${%TraceableServer}" field="traceableServer">
<select name="traceableServer">
<option value="api-dev.traceable.ai" selected="${instance.traceableServer.equals('app-dev.traceable.ai') || $instance.traceableServer.equals(null)? 'true':null}"> app-dev.traceable.ai </option>
<option value="api.traceable.ai" selected="${instance.traceableServer.equals('app.traceable.ai')? 'true':null}"> app.traceable.ai </option>
<option value="api-dev.traceable.ai" selected="${instance.traceableServer.equals('api-dev.traceable.ai') || $instance.traceableServer.equals(null)? 'true':null}"> app-dev.traceable.ai </option>
<option value="api.traceable.ai" selected="${instance.traceableServer.equals('api.traceable.ai')? 'true':null}"> app.traceable.ai </option>
</select>
</f:entry>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ GRAPHQL_ENDPOINT="https://$1/graphql"
API_ENDPOINT="https://$1/rest/v2/upload/documentation/openapi"
PLATFORM_TOKEN="$2"
SPEC_PATH="$3"
echo $SPEC_PATH
FILE_NAME=$(basename "$SPEC_PATH")
GRAPHQL_QUERY='mutation {
createApiSpec(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Search for OpenAPI 3.x.x specifications
spec_files=$(find "${1}" -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.json" \) -print0 | xargs -0 grep -l -e "openapi: 3" -e "\"openapi\": 3")
spec_files=$(find "${1}" -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.json" \) -print0 | xargs -0 grep -l -E '^\s*("openapi"|openapi)?\s*:\s*("3\.[0-9]+\.[0-9]+"|3\.[0-9]+\.[0-9]+)\s*')

spec_files="$spec_files"$'\n'
# Search for Swagger 2.0 specifications
spec_files+=$(find "${1}" -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.json" \) -print0 | xargs -0 grep -l -e "swagger: \"2.0\"" -e "\"swagger\": \"2.0\"" )
echo "$spec_files"
spec_files+=$(find "${1}" -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.json" \) -print0 | xargs -0 grep -l -E '^\s*("swagger"|swagger)?\s*:\s*("2\.0"|2\.0)\s*')

echo "$spec_files"

0 comments on commit 9e0a0d9

Please sign in to comment.