1.1.2 • Published 5 months ago

multi-swagger v1.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

Multi-Swagger

Multi-Swagger allows you to document how your apis talk to each other, all using the familiar Swagger UI!

To run, use:

  npm run multi-swagger <path>

Where <path> is the path to the JSON file that describes how your apis talk to each other. This file consists of:

  • A list of Services, each with a Name and an Endpoints field with the location of the corresponding OpenAPI specification.

  • Within each service, an optional Clients field, with a list of service names. These define other services which that service calls into, for instance, the RoomServiceApi calls into both StockKeepingApi and RoomBookingApi.

e.g:

{
  "Services": [
    {
      "Name": "RoomBookingApi",
      "Endpoints": "./roomBookingApi.json"

    },
    {
      "Name": "DeliveryApi",
      "Endpoints": "./deliveryApi.json"
    },
    {
      "Name": "RoomServiceApi",
      "Endpoints": "./roomServiceApi.json",
      "Clients": [
        "RoomBookingApi",
        "StockKeepingApi"
      ]
    },
    {
      "Name": "StockKeepingApi",
      "Endpoints": "./stockKeepingApi.json",
      "Clients": [
        "DeliveryApi",
        "RoomBookingApi"
      ]
    },
    {
      "Name": "CleaningScheduleService",
      "Endpoints": "./cleaningScheduleService.json"
    }
  ]
}

This means that within the RoomServiceApi UI, there will be a:

1) 'Controllers' section, with the OpenAPI spec of RoomServiceApi, with links to services that call into it.

2) 'Clients' section with the api specification of StockKeepingApi and RoomBookingApi, and links to the UI pages for those services.

demo

You can find an example set of files here!

You can see multi-swagger in action here!

How it works

Multi-Swagger will recreate the files used in a temporary directory in the temp folder. It will then run a http-server on port 8521, and open the swagger-ui React app in the default browser on port 8532.

Advanced Usage

You can also include services that don't expose endpoints of their own - simply remove the 'Endpoints' property:

...
{
  "Name": "KeyReader",
  "Clients": [
        "RoomBookingApi",
        "CleaningScheduleService"
      ]        
}

For more info on using swagger, see the swagger-ui documentation.

1.1.2

5 months ago

0.0.130

5 months ago

0.0.129

5 months ago

0.0.128

5 months ago

0.0.127

5 months ago

0.0.126

5 months ago

0.0.125

6 months ago

0.0.124

6 months ago

0.0.123

6 months ago

0.0.122

6 months ago

0.0.121

6 months ago

0.0.120

6 months ago

0.0.119

6 months ago

0.0.118

6 months ago

0.0.117

6 months ago

0.0.116

6 months ago

0.0.115

6 months ago

0.0.114

6 months ago

0.0.113

6 months ago

0.0.112

6 months ago

0.0.111

6 months ago

0.0.110

6 months ago

0.0.109

6 months ago

0.0.108

6 months ago

0.0.107

6 months ago

0.0.106

6 months ago

0.0.105

6 months ago

0.0.103

6 months ago

0.0.102

6 months ago

0.0.101

6 months ago

0.0.100

6 months ago

0.0.99

6 months ago

0.0.98

7 months ago

0.0.97

7 months ago

0.0.96

7 months ago

0.0.95

7 months ago

0.0.94

7 months ago

0.0.93

7 months ago

0.0.92

7 months ago

0.0.91

7 months ago

0.0.90

7 months ago

0.0.89

7 months ago

0.0.88

7 months ago

0.0.86

7 months ago

0.0.85

7 months ago

0.0.84

7 months ago

0.0.83

7 months ago

0.0.82

7 months ago

0.0.81

7 months ago

0.0.80

7 months ago

0.0.79

7 months ago

0.0.77

7 months ago

0.0.76

7 months ago

0.0.75

7 months ago

0.0.74

7 months ago

0.0.73

7 months ago

0.0.72

7 months ago

0.0.71

7 months ago

0.0.70

7 months ago

0.0.69

7 months ago

0.0.68

7 months ago

0.0.67

7 months ago

0.0.65

7 months ago

0.0.62

7 months ago

0.0.61

7 months ago

0.0.60

7 months ago

0.0.59

7 months ago

0.0.58

7 months ago

0.0.57

7 months ago

0.0.56

7 months ago

0.0.55

7 months ago

0.0.53

7 months ago

0.0.52

7 months ago

0.0.51

7 months ago

0.0.50-s

7 months ago

0.0.49

7 months ago

0.0.48

7 months ago

0.0.47

7 months ago

0.0.45

7 months ago

0.0.43

7 months ago

0.0.42

7 months ago

0.0.41

7 months ago

0.0.40

7 months ago

0.0.39

7 months ago

0.0.38

7 months ago

0.0.37

7 months ago

0.0.36

7 months ago

0.0.35

7 months ago

0.0.34

7 months ago

0.0.33

7 months ago

0.0.32

7 months ago

0.0.31

7 months ago

0.0.30

7 months ago

0.0.29

7 months ago

0.0.28

7 months ago

0.0.27

7 months ago

0.0.26

7 months ago

0.0.25

7 months ago

0.0.24

7 months ago

0.0.23

7 months ago

0.0.22

7 months ago

0.0.21

7 months ago

0.0.20

7 months ago

0.0.19

7 months ago

0.0.18

7 months ago

0.0.16

7 months ago

0.0.15

7 months ago

0.0.14

7 months ago

0.0.13

7 months ago

0.0.12

7 months ago

0.0.11

7 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago

1.0.32

7 months ago

1.0.31

7 months ago

1.0.30

7 months ago

1.0.29

7 months ago

1.0.28

7 months ago

1.0.27

7 months ago

1.0.26

7 months ago

1.0.25

7 months ago

1.0.22

7 months ago

1.0.21

7 months ago

1.0.20

7 months ago

1.0.19

7 months ago

1.0.18

7 months ago

1.0.17

7 months ago

1.0.16

7 months ago

1.0.15

7 months ago

1.0.14

7 months ago

1.0.12

7 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

4.19.0

7 months ago