Skip to content

This sample implements a Linx REST API based on the Swagger 'Petstore' OpenAPI definition and is hosted on a Linx Cloud Server

Notifications You must be signed in to change notification settings

linx-software/petstore-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Swagger Petstore - OpenAPI 3.0 sample

Description

This sample implements a Linx REST API based on the Swagger 'Petstore' OpenAPI definition and is hosted on a Linx Cloud Server, more details on the original 'Petstore' GitHub project can be found here. The operations of the Linx API do not persist any data, but rather, request data is forwarded to actual 'Petstore' server via HTTP requests.

View the live demo hosted on a Linx Cloud Server.

Installation

Cloud server deployment

This solution can be deployed directly to your Linx Cloud server instance.

  1. Register for a Linx trial cloud server here.
  2. You will receive an email containing your Linx cloud server credentials when your trial server has been activated.
  3. Log into your cloud server instance and upload the Solution (Top Menu > Server > Upload).
  4. On the Solution's service dashboard page, start all of the services for the Solution.
  5. Once the service has started, you are able to make requests using the base URL of:
    https://{your instance name}.api.linx.twenty57.net/petstore
    

Local environment

The below steps describe how to setup the sample to run on your local Linx Designer environment.

  1. Download and install the Linx Designer here.
  2. Open the sample Solution (.lsoz) in your Linx Designer.
  3. Alter the below Solution Settings:
    • LinxIsLocalDevEnv : True
  4. Select the RESTHost service, right click and select debug. Once initialised, start the debugger.
  5. Once the debugger has started, you are able to make requests locally to:
    https://localhost:8080/petstore
    

Usage

Swagger UI

View live demo.

Postman

  1. Open Postman and import the provided request collection in Postman.

  2. Alter the collection variables to reflect your cloud environment.

  3. Open each request and pass or change parameters and body values as described in https://petstore3.swagger.io/

Contributing

For questions please ask the Linx community or use the Slack channel.

License

MIT

About

This sample implements a Linx REST API based on the Swagger 'Petstore' OpenAPI definition and is hosted on a Linx Cloud Server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published