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

feat(specs): add analytics specs and client. #36

Merged
merged 11 commits into from
Dec 15, 2021

Conversation

shortcuts
Copy link
Member

🧭 What and Why

🎟 JIRA Ticket:

Changes included:

  • Adds analytics specs and client
  • Removes max-params in eslint config
  • Update CI
  • Retry eslint command on fail (see comment)

🧪 Test

CI :D

@shortcuts shortcuts marked this pull request as ready for review December 14, 2021 11:43
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Massive PR ! There seems to be a lot of redundancy with the types but there are all uniques, it would be best with generics but impossible with code generation.

specs/analytics/paths/search/getTopFiltersNoResults.yml Outdated Show resolved Hide resolved
content:
application/json:
schema:
oneOf:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java will be sad

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to transform this with polymorphism or optional properties ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that it wouldn't represent the API... but indeed for Java (😢) we could have a fully optional type

EndDate:
in: query
name: endDate
description: The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need a dot here ? The linter didn't catch that ?

Copy link
Member Author

@shortcuts shortcuts Dec 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yamllint did not catch it and I think eslint automatically applied a dot on the output. I wonder if we could add a spec rule, I'll check!

Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for me 👍

@shortcuts shortcuts merged commit 18fa5fa into main Dec 15, 2021
@shortcuts shortcuts deleted the feat/APIC-199/analytics-specs branch December 15, 2021 09:52
@shortcuts shortcuts self-assigned this Dec 16, 2021
Copy link
Contributor

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯
Just small unrelated comments

.eslintrc.js Show resolved Hide resolved
return (
isTimedOut ||
isNetworkError({ isTimedOut, status }) ||
(~~(status / 100) !== 2 && ~~(status / 100) !== 4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, I'm sure it was copied from nuno but are we fine those ~~ I honestly don't know what they mean ahah

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, It seems like an overcomplicated way to have the absolute value of status

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least 4 people said this ahah I think we can remove them they are more confusing than anything

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, will do a second PR right after

shortcuts added a commit that referenced this pull request Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants