Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Endpoint YAML #2964

Closed
plastictortoise opened this issue Feb 8, 2019 · 9 comments
Closed

Feature Request: Endpoint YAML #2964

plastictortoise opened this issue Feb 8, 2019 · 9 comments
Labels
service-badge New or updated service badge

Comments

@plastictortoise
Copy link

plastictortoise commented Feb 8, 2019

📋 Description

I understand that the Endpoint badge is still in BETA, but it would be useful for the badge to use YAML as well as JSON.

It is just an idea, but I think that it would help some people who use YML more than JSON. Here is a comparison:

JSON

{
  "schemaVersion": 1,
  "label": "hello",
  "message": "world",
  "color": "lightgrey"
}

YAML

schemaVersion: 1
label: "hello"
message: "world"
color: "lightgrey"
  • SimpleBinary
@paulmelnikow
Copy link
Member

Hi! Thanks for the suggestion. How would this feature be used?

@plastictortoise
Copy link
Author

@paulmelnikow This feature would be used by people who have never used JSON but still want the endpoint badge.

@calebcartwright
Copy link
Member

calebcartwright commented Feb 9, 2019

Are you saying you'd like to be able to deploy a custom endpoint that responds with YAML instead of JSON and have the endpoint badge be able to handle that YAML response?

In parallel/in the interim, have you tried using our Dynamic (or Static) YAML badge?

@plastictortoise
Copy link
Author

@calebcartwright Yes, I have tried using the dynamic badge but I couldn't get it to work.

@paulmelnikow
Copy link
Member

YAML has advantages as a human-editable format, though as a format for communicating between servers it doesn't, and hence is hardly ever used as one. I'm not yet convinced that endpoint YAML makes anything possible that isn't already possible.

I'm open to reconsidering in relation to a specific use case.

@Kristinita
Copy link

type:+1

Argumentation:

Users, not bots write configuration for endpoints → YAML or TOML would be better than JSON.

Thanks.

@paulmelnikow
Copy link
Member

I’m still a bit confused, as API endpoints aren’t configuration files. If you have a use case that requires hand-crafting a badge.yml file, could you explain it?

@chris48s
Copy link
Member

👍 in general, the endpoint badge covers the case when the data needs to be machine-generated.

If I wanted to produce the example given in the top post, instead of making a JSON endpoint which returns

{
  "schemaVersion": 1,
  "label": "hello",
  "message": "world",
  "color": "lightgrey"
}

we can just hard-code https://img.shields.io/badge/hello-world-lightgrey.svg

@paulmelnikow paulmelnikow added the service-badge New or updated service badge label Feb 18, 2019
@paulmelnikow
Copy link
Member

Feel free to comment if there's new information here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

5 participants