hapi-swaggered icon indicating copy to clipboard operation
hapi-swaggered copied to clipboard

Implement Security Requirement Object

Open grabbou opened this issue 10 years ago • 3 comments

As per spec https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#securityRequirementObject

Would be quite nice to set that up by default by getting scope array parameter that's sometimes set in config.auth of a given route, especially when being used with hapi-auth-jwt or any token-based auth scheme.

What you think?

grabbou avatar Apr 25 '15 15:04 grabbou

If not, then let's just figure out how to expose scopes nicely without violating swagger specification. Currently, in order to have scopes nicely exposed, I need to tweak the route description by prepending it with toString of the scopes array.

So Gets list of all users becomes [users:read] Gets list of all users

grabbou avatar Apr 25 '15 15:04 grabbou

Should wait for https://github.com/swagger-api/swagger-ui/issues/1108

z0mt3c avatar May 05 '15 14:05 z0mt3c

Looks like https://github.com/swagger-api/swagger-ui/pull/2014 is merged. Is anyone already working on this?

stjohnjohnson avatar May 16 '16 18:05 stjohnjohnson