5

In API Blueprint, how do I avoid using the same request Authorization header block over and over for every endpoint?

+ Request (application/json)
    + Headers

            Authorization: Bearer jsonWebToken

Is there a way to template this in a data structure perhaps?

Drew Baker
  • 14,154
  • 15
  • 58
  • 97

2 Answers2

3

Unfortunately API Blueprint has not such feature (yet)

On the other hand, I can tell you that authentication\authorisation framework is being worked - so it's possible that in a not so far future this issue will be solved for you.

Cheers!

Vincenzo
  • 1,549
  • 1
  • 9
  • 17
1

Vincenzo answer is correct. The issue planned to address this is Authentication and MSON Parameters and Headers.

In the mean time. One work-around would be to use Hercule to split your blueprint into multiple parts and transclude the auth headers.

Zdenek
  • 3,653
  • 27
  • 34