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

chore: Optimize Api definition #738

Closed
wants to merge 1 commit into from
Closed

chore: Optimize Api definition #738

wants to merge 1 commit into from

Conversation

tyyzqmf
Copy link
Contributor

@tyyzqmf tyyzqmf commented Dec 25, 2023


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Summary

  1. Standardization API path to make the consistent API style, and clarify the meaning of the API by name.
    Standardization API path to make the consistent API style #215
    for example:
 POST /api/pipeline ---> POST /api/pipeline/CreatePipeline
 GET /api/pipeline ---> GET /api/pipeline/ListPipelines
 GET /api/pipeline/<id> ---> GET /api/pipeline/GetPipeline?id=xxx
  1. Interface parameters, for example:
  • The GET method only uses query to pass parameters
  • The POST/PUT/DELETE method only uses body to pass parameters
  1. Define Request and Response objects for all API, shared by front-end and back-end services

  2. Distinguish between the Response object returned by the API and the DDB raw object, avoid to exposing the internal data structure.
    response event name in api #338

Implementation highlights

(describe how the merge request does for feature changes, share the RFC link if it has)

Test checklist

  • add new test cases
  • all code changes are covered by unit tests
  • end-to-end tests
    • deploy web console with CloudFront + S3 + API gateway
    • deploy web console within VPC
    • deploy ingestion server
      • with MSK sink
      • with KDS sink
      • with S3 sink
    • deploy data processing
    • deploy data modeling
      • new Redshift Serverless
      • provisioned Redshift
      • Athena
    • deploy with reporting

Is it a breaking change

  • add parameters without default value in stack
  • introduce new service permission in stack
  • introduce new top level stack module

Miscellaneous

  • introduce new symbol link source file(s) to be shared among infra code, web console frontend, and web console backend

@tyyzqmf tyyzqmf self-assigned this Dec 25, 2023
Copy link

Data Pipeline spark application's test coverage

Overall Project 96.84% 🍏

There is no coverage information present for the Files changed

Copy link

Data Pipeline spark application's test coverage

Overall Project 96.84% 🍏

There is no coverage information present for the Files changed

Copy link

Data Pipeline spark application's test coverage

Overall Project 96.84% 🍏

There is no coverage information present for the Files changed

1 similar comment
Copy link

Data Pipeline spark application's test coverage

Overall Project 96.84% 🍏

There is no coverage information present for the Files changed

@jingnanl
Copy link
Contributor

jingnanl commented Jan 5, 2024

Here is RESTful API naming convention: https://restfulapi.net/resource-naming/

We should not use URIs to indicate a CRUD function. URIs should only be used to identify the resources and not any action upon them uniquely. We should use HTTP request methods to indicate which CRUD function is performed.

It is not correct to put the verbs in REST URIs. REST uses nouns to represent resources, and HTTP methods (GET, POST, PUT, DELETE, etc.) are then used to perform actions on those resources, effectively acting as verbs.

@tyyzqmf
Copy link
Contributor Author

tyyzqmf commented Jan 10, 2024

Here is RESTful API naming convention: https://restfulapi.net/resource-naming/

We should not use URIs to indicate a CRUD function. URIs should only be used to identify the resources and not any action upon them uniquely. We should use HTTP request methods to indicate which CRUD function is performed.

It is not correct to put the verbs in REST URIs. REST uses nouns to represent resources, and HTTP methods (GET, POST, PUT, DELETE, etc.) are then used to perform actions on those resources, effectively acting as verbs.

Great suggestion! I will refactor according to this rule.

@tyyzqmf tyyzqmf force-pushed the api-v2 branch 2 times, most recently from 24f74b3 to bcf3772 Compare January 11, 2024 08:07
Copy link

Data Pipeline spark application's test coverage

Overall Project 97.12% 🍏

There is no coverage information present for the Files changed

1 similar comment
Copy link

Data Pipeline spark application's test coverage

Overall Project 97.12% 🍏

There is no coverage information present for the Files changed

Copy link

Data Pipeline spark application's test coverage

Overall Project 96.25% 🍏

There is no coverage information present for the Files changed

@tyyzqmf tyyzqmf force-pushed the api-v2 branch 2 times, most recently from a5acc26 to 8f1b340 Compare February 20, 2024 13:36
Copy link

Data Pipeline spark application's test coverage

Overall Project 96.52% 🍏

There is no coverage information present for the Files changed

1 similar comment
Copy link

Data Pipeline spark application's test coverage

Overall Project 96.52% 🍏

There is no coverage information present for the Files changed

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.

None yet

2 participants