Repository navigation
[Endpoint] Support message override and position it after label in API docs - #12235
Conversation
|
👋🏻 I haven't wrapped my head around this yet, but I'm seeing that two past maintainers were opposed to this feature. What's your take on this? |
|
I was planning to use an API to call the Endpoint Badge to display this badge. However, I've found that I can't customize the message because the message is always hardcoded into the Endpoint Badge's JSON. For example: Let's use this example JSON for endpoint response. And the As a social badge provider, I'd like to allow users to customize the badge label and message however they want. They can simply use It would be simpler if we could customize it using the endpoint badge’s parameter. I want the service to care only about changes to the logo and leave everything else to Shields.io's endpoint. This way, I won't have to deal with character security issues on my own server. |
Adds an optional
messagequery parameter to Endpoint badges to override the message returned by the JSON endpoint:When omitted, the endpoint’s message is preserved. Empty overrides are rejected, and response validation errors remain visible.
Updates the API documentation and adds
displayAfter/x-display-aftersupport to placemessageimmediately afterlabel.