diff --git a/scripts/bin/jetty-runner.jar b/scripts/bin/jetty-runner.jar
new file mode 100644
index 00000000..b9887e9f
Binary files /dev/null and b/scripts/bin/jetty-runner.jar differ
diff --git a/scripts/bin/swagger-editor.war b/scripts/bin/swagger-editor.war
index afaea181..5dde5f29 100644
Binary files a/scripts/bin/swagger-editor.war and b/scripts/bin/swagger-editor.war differ
diff --git a/scripts/editor.sh b/scripts/editor.sh
index fc17702c..263a06af 100644
--- a/scripts/editor.sh
+++ b/scripts/editor.sh
@@ -1 +1,2 @@
-mvn -f editor/editor.xml jetty:run-war
\ No newline at end of file
+#!/usr/bin/env bash
+java -Dconfig=editor/inflector.yaml -jar editor/jetty-runner.jar --port 8000 editor/swagger-editor.war
\ No newline at end of file
diff --git a/scripts/editor.xml b/scripts/editor.xml
deleted file mode 100644
index 01292022..00000000
--- a/scripts/editor.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
- 4.0.0
- com.wordnik
- swagger-editor
- swagger-editor
- 1.0.1
-
- 2.2.0
-
-
-
- src/main/java
-
-
- org.eclipse.jetty
- jetty-maven-plugin
- 9.2.9.v20150224
-
- swagger-editor.war
-
- 8000
- 60000
-
-
-
-
-
-
-
- sonatype-snapshots
- https://oss.sonatype.org/content/repositories/snapshots
-
-
- sonatype-releases
- https://oss.sonatype.org/content/repositories/releases
-
-
-
-
- javax.servlet
- servlet-api
- ${servlet-api-version}
-
-
- commons-io
- commons-io
- 2.4
-
-
-
- 3.1.0
- 9.4.11.v20180605
- 2.5
-
-
diff --git a/scripts/openapi.yaml b/scripts/openapi.yaml
deleted file mode 100644
index bd4b2a6e..00000000
--- a/scripts/openapi.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
-openapi: 3.0.0
-servers:
- - url: /v1
-info:
- version: 1.0.0
- title: Sample API
-paths:
- /people:
- get:
- tags:
- - People
- description: |
- Gets `Person` objects.
- Optional query param of **size** determines
- parameters:
- - name: size
- in: query
- description: Size of array
- required: true
- schema:
- type: integer
- format: int32
- responses:
- '200':
- description: Successful response
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Person'
- application/xml:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Person'
-components:
- schemas:
- Person:
- type: object
- properties:
- firstname:
- type: string
- lastname:
- type: string
- single:
- type: boolean
\ No newline at end of file
diff --git a/scripts/pom.xml b/scripts/pom.xml
index 702d763d..b1372a09 100644
--- a/scripts/pom.xml
+++ b/scripts/pom.xml
@@ -24,9 +24,9 @@
4.0.0
io.swagger
SAMPLE_PROJECT
- jar
+ war
SAMPLE_PROJECT
- 1.0.1
+ 1.0.0
2.2.0
diff --git a/setup.sh b/setup.sh
index 44d2f06d..32b6bd47 100644
--- a/setup.sh
+++ b/setup.sh
@@ -1,4 +1,6 @@
+#!/usr/bin/env bash
PROJECT=$project
+FORK=${FORK:-"swagger-api/swagger-inflector/raw/master"}
if [ "$PROJECT" == "" ]
then
@@ -10,6 +12,8 @@ then
exit
fi
+echo "fetching setup files from $FORK"
+
# setup dirs
mkdir -p editor
mkdir -p src/main/swagger
@@ -17,26 +21,22 @@ mkdir -p src/main/webapp/WEB-INF
if [ ! -f editor/swagger-editor.war ]; then
echo "...fetching editor webapp"
- wget --quiet --no-check-certificate "https://github.com/swagger-api/swagger-inflector/raw/master/scripts/bin/swagger-editor.war" -O editor/swagger-editor.war
+ curl -sL "https://raw.githubusercontent.com/$FORK/scripts/bin/swagger-editor.war" -o editor/swagger-editor.war
+ curl -sL "https://raw.githubusercontent.com/$FORK/scripts/bin/jetty-runner.jar" -o editor/jetty-runner.jar
fi
echo "...fetching editor scripts"
-wget --quiet --no-check-certificate "https://github.com/swagger-api/swagger-inflector/raw/master/scripts/editor.xml" -O editor/editor.xml
-wget --quiet --no-check-certificate "https://github.com/swagger-api/swagger-inflector/raw/master/scripts/editor.sh" -O ./editor.sh
-
-echo "...fetching sample swagger description"
-
-wget --quiet --no-check-certificate "https://raw.githubusercontent.com/swagger-api/swagger-inflector/master/scripts/openapi.yaml" -O src/main/swagger/openapi.yaml
+curl -sL "https://raw.githubusercontent.com/$FORK/scripts/editor.sh" -o ./editor.sh
echo "...fetching inflector configuration"
-wget --quiet --no-check-certificate "https://raw.githubusercontent.com/swagger-api/swagger-inflector/master/scripts/inflector.yaml" -O ./inflector.yaml
+curl -sL "https://raw.githubusercontent.com/$FORK/scripts/inflector.yaml" -o ./inflector.yaml
echo "...fetching project pom"
-wget --quiet --no-check-certificate "https://raw.githubusercontent.com/swagger-api/swagger-inflector/master/scripts/pom.xml" -O ./pom.xml
+curl -sL "https://raw.githubusercontent.com/$FORK/scripts/pom.xml" -o ./pom.xml
echo "...fetching web.xml"
-wget --quiet --no-check-certificate "https://raw.githubusercontent.com/swagger-api/swagger-inflector/master/scripts/web.xml" -O src/main/webapp/WEB-INF/web.xml
+curl -sL "https://raw.githubusercontent.com/$FORK/scripts/web.xml" -o src/main/webapp/WEB-INF/web.xml
chmod a+x ./editor.sh
rp="s/SAMPLE_PROJECT/$PROJECT/g"