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

p3 initial changes #1177

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

p3 initial changes #1177

wants to merge 8 commits into from

Conversation

dwivedianurag
Copy link
Contributor

No description provided.

Copy link

vercel bot commented May 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview May 8, 2024 9:37pm

@dwivedianurag
Copy link
Contributor Author

@diana-macrometa @joubert-macrometa i will review the current api once more and if needed will make needful changes and then will remove the do not merge flag

src/pages/apiP3.js Outdated Show resolved Hide resolved
Copy link
Contributor

@joubert-macrometa joubert-macrometa left a comment

Choose a reason for hiding this comment

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

  1. A few inconsistent 200 messages
  2. There are many options (fields) that have no description. I have no idea what to do with them? Not sure what values I should put in them or when they are reporting something, I don't know what these values mean.
  3. Most of these messages could use some help running through an LLM to help correct grammatic errors.

},
"urlPattern": {
"type": "string",
"description": "Url pattern to group same pages under similar set of optimizations.",
Copy link
Contributor

Choose a reason for hiding this comment

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

The description says url. But the example is a path?
Is it a path or a URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is a path @joubert-macrometa

static/openapi/p3-spec.json Outdated Show resolved Hide resolved
"serverUrl": {
"type": "string",
"description": "Origin/server URL from where the html content needs to be fetched to run optimizations.",
"example": "something.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

The description says URL, but the example is a host or a domain.

static/openapi/p3-spec.json Outdated Show resolved Hide resolved
static/openapi/p3-spec.json Outdated Show resolved Hide resolved
},
"responses": {
"200": {
"description": "PPM Job successfully created.",
Copy link
Contributor

Choose a reason for hiding this comment

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

In most return message you used "Successfully xxxx". Here it is different.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do not capitalize "job" here.

"tags": [
"PPM"
],
"summary": "Get Web Vitals Metrics Percentile",
Copy link
Contributor

Choose a reason for hiding this comment

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

This sounds strange: "Vitals Metrics". Two plural words? Maybe not. Just noting it sounded funny to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

I do not like all the caps.

"PPM"
],
"summary": "Get Web Vitals Metrics Percentile",
"description": "Retrieves web vitals metrics percentile data based on the provided datetime range and pagination.",
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure how this api works based on the parameters.

You pass in 75. What is it supposed to return?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would not bother mentioning the "pagination" in the description. Focus more on what is this API going to do for me? It looks like some kind of metrics, I don't know what vitals is, don't understand percentile data thing.

],
"responses": {
"200": {
"description": "Web vitals metrics percentile data successfully retrieved.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Again different format from other 200 messages

Copy link
Contributor

Choose a reason for hiding this comment

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

Joubert, is there guidance in your API directions? Because it sounds like there needs to be.

"properties": {
"url": {
"type": "string",
"example": "https://something.com/something/"
Copy link
Contributor

Choose a reason for hiding this comment

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

example.com?

"openapi": "3.0.0",
"info": {
"title": "PhotonIQ Performance Proxy API",
"description": "API documentation for the PhotonIQ P3 API Service",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"description": "API documentation for the PhotonIQ P3 API Service",
"description": "API documentation for PhotonIQ Performance Proxy (P3).",

},
"serverUrl": {
"type": "string",
"example": "https://something.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

@joubert-macrometa, do we have a standard example URL?

"name": "Cache"
},
{
"name": "PPM"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like "PPM" as a section title, maybe spell it out? The acronym isn't obvious to users.

},
{
"name": "Telemetry",
"description": "(example can change)"
Copy link
Contributor

Choose a reason for hiding this comment

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

This and the next one need actual test, not placeholders.

},
"pageType": {
"type": "string",
"description": "Type of page to be optimized.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to list the options.

},
"optimizationLevel": {
"type": "string",
"description": "Optimization category to decide which optimizations needs to be applied.",
Copy link
Contributor

Choose a reason for hiding this comment

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

The levels are light, standard, and aggressive. I still need those defined for the docs.

},
"optimizers": {
"type": "object",
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, the users can customize these from the API? They cannot do that from the UI, why the difference?

static/openapi/p3-spec.json Outdated Show resolved Hide resolved
"description": "Authorization failure due to invalid authentication credentials."
},
"403": {
"description": "Either the API key doesn't have permissions or it is deactivated."
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought it was JWT, not API key?

static/openapi/p3-spec.json Outdated Show resolved Hide resolved
static/openapi/p3-spec.json Outdated Show resolved Hide resolved
"description": "Authorization failure due to invalid authentication credentials."
},
"403": {
"description": "Either the API key doesn't have permissions or it is deactivated."
Copy link
Contributor

Choose a reason for hiding this comment

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

So, since JWTs are apparently an option, is it correct to have this error mention API keys throughout? Is it possible the user is authenticating with JWT instead?

@diana-macrometa
Copy link
Contributor

@borisgmacrometa, FYI, we are waiting for action on our edits for this PR.

@dwivedianurag
Copy link
Contributor Author

assigning this to @edgargarciamacrometa to make the changes in the pr as per the recommendations by @joubert-macrometa
cc @borisgmacrometa

@edgargarciamacrometa
Copy link
Contributor

Changes are in this PR: #1231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants