diff --git a/.github/workflows/petstore-demo.yml b/.github/workflows/petstore-demo.yml new file mode 100644 index 00000000..5d681b4a --- /dev/null +++ b/.github/workflows/petstore-demo.yml @@ -0,0 +1,31 @@ +name: Petstore Demo CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout source code + uses: actions/checkout@v3 + + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + + - name: Build with Maven + run: mvn clean install + + - name: Simulate Deployment + run: | + echo "Packaging the application..." + echo "Deploying to development environment..." + echo "✅ Deployment complete" + diff --git a/README.md b/README.md index e5785f36..dcf10663 100644 --- a/README.md +++ b/README.md @@ -1,44 +1 @@ -# Swagger Petstore Sample - -## Overview -This is the pet store sample hosted at https://petstore3.swagger.io. For other versions, check the branches. -We welcome suggestion both the code and the API design. -To make changes to the design itself, take a look at https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml. - -This is a java project to build a stand-alone server which implements the OpenAPI 3 Spec. You can find out -more about both the spec and the framework at http://swagger.io. - -This sample is based on [swagger-inflector](https://github.com/swagger-api/swagger-inflector), and provides an example of swagger / OpenAPI 3 petstore. - -### To run (with Maven) -To run the server, run this task: - -``` -mvn package jetty:run -``` - -This will start Jetty embedded on port 8080. - -### To run (via Docker) - -Expose port 8080 from the image and access petstore via the exposed port. You can then add and delete pets as you see fit. - - -*Example*: - -``` -docker build -t swaggerapi/petstore3:unstable . -``` - -``` -docker pull swaggerapi/petstore3:unstable -docker run --name swaggerapi-petstore3 -d -p 8080:8080 swaggerapi/petstore3:unstable -``` - - -### Testing the server -Once started, you can navigate to http://localhost:8080/api/v3/openapi.json to view the Swagger Resource Listing. -This tells you that the server is up and ready to demonstrate Swagger. - -### Using the UI -There is an HTML5-based API tool bundled in this sample--you can view it it at [http://localhost:8080](http://localhost:8080). This lets you inspect the API using an interactive UI. You can access the source of this code from [here](https://github.com/swagger-api/swagger-ui) +# Swagger Petstore Test Repo