5.4.0 • Published 1 year ago

volante-swagger v5.4.0

Weekly downloads
4
License
ISC
Repository
github
Last release
1 year ago

Volante Swagger Spoke

Volante module for Swagger/OpenAPI doc parsing and browsing through a live Swagger UI served through volante-express.

Usage

npm install volante-swagger

Volante modules are automatically loaded and instanced if they are installed locally and hub.attachAll() is called. Or add it to the "attach" array in your volante config file.

{
	"attach": [
		"volante-swagger"
	]
}

Once the Volante-powered server is running (for example, with volante-express defaults), the Swagger UI should be accessible at:

http://localhost:3000/api/swagger

Props

Options are changed using either the config file VolanteSwagger sub-object:

{
	"VolanteSwagger": {
		"enabled": true,
		"title": "Cool server",
		"description": "a description",
		"ui": "<defaults to /api/swagger>",
		"json": "<defaults to /api/swagger.json>"
	}
}

...or manually via a VolanteSwagger.update event with an options object:

hub.emit('VolanteSwagger.update', {
	enabled: true,
	title: "Cool server",
	description: "a description",
	ui: "<defaults to /api/swagger>",
	json: "<defaults to /api/swagger.json>"
});

Events Emitted

In addition to native Volante log events, this modules also emits:

  • VolanteSwagger.accessed() - emitted when the swagger-ui page is requested
    events: {
      'VolanteSwagger.accessed'() {
      	this.$log('swagger ui was accessed');
      }
    }

License

ISC

5.4.0

1 year ago

5.3.0

1 year ago

5.2.0

1 year ago

5.1.0

2 years ago

5.0.0

2 years ago

4.1.0

2 years ago

4.0.0

2 years ago

3.0.0

3 years ago

2.0.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago