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

Support yaml files #139

Open
T0RAT0RA opened this issue Dec 13, 2022 · 2 comments
Open

Support yaml files #139

T0RAT0RA opened this issue Dec 13, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@T0RAT0RA
Copy link
Contributor

Provide a way to support yaml instead of json.

Ex: all.yaml:

---
- entityRef:
    kind: api
    name: api.foo
  scorePercent: 50
  scoreLabel: Yellow
  scoringReviewDate: '2022-01-01T08:00:00Z'
  scoreSuccess: almost-failure
  areaScores:
  - title: Extensibility
    scorePercent: 50
    scoreLabel: Yellow
    scoreSuccess: almost-failure
  - title: Code
    scorePercent: 100
    scoreLabel: Green
    scoreSuccess: success
  - title: Quality
    scorePercent: 25
    scoreLabel: Red
    scoreSuccess: failure
  - title: Documentation
    scorePercent: 100
    scoreLabel: Green
    scoreSuccess: success
  - title: Operations
    scorePercent: 50
    scoreLabel: Yellow
    scoreSuccess: almost-failure

Feature Suggestion

JSON doesn't support comments so having the scores in YAML enable commenting the score file, for better maintenance.

Possible Implementation

Adding a new boolean config useYaml that would use .yaml suffix to the urls, and convert the fileback to JSON before processing it.

Context

I can provide an implementation once I'm done with #99

@jvilimek jvilimek added the enhancement New feature or request label Dec 13, 2022
@jvilimek
Copy link
Collaborator

Thanks for the suggestion. How do you plan to do it? Implementing a new ScoringDataYamlClient ?

@T0RAT0RA
Copy link
Contributor Author

Yes it could be, but I see some common code in ScoringDataJsonClient.ts that could be extracted, like the helpers and the call to the catalog API.

Actually the only difference will be:

Then we call the catalog and extend the Entity Score.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants