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

fix(openapi): Standardise API naming scheme for V2 #6510

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

Conversation

AnuthaDev
Copy link
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Use kebab-case for all API endpoints in V2

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@AnuthaDev AnuthaDev added C-doc Category: Documentation updates api-v2 labels Nov 7, 2024
@AnuthaDev AnuthaDev added this to the November 2024 Release milestone Nov 7, 2024
@AnuthaDev AnuthaDev self-assigned this Nov 7, 2024
Copy link

semanticdiff-com bot commented Nov 7, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  api-reference-v2/mint.json  39% smaller
  crates/router/src/routes/app.rs  27% smaller
  api-reference/openapi_spec.json  17% smaller
  crates/openapi/src/routes/api_keys.rs  1% smaller
  crates/openapi/src/routes/merchant_connector_account.rs  1% smaller
  api-reference-v2/api-reference/api-key/api-key--create.mdx Unsupported file format
  api-reference-v2/api-reference/api-key/api-key--list.mdx Unsupported file format
  api-reference-v2/api-reference/api-key/api-key--retrieve.mdx Unsupported file format
  api-reference-v2/api-reference/api-key/api-key--revoke.mdx Unsupported file format
  api-reference-v2/api-reference/api-key/api-key--update.mdx Unsupported file format
  api-reference-v2/api-reference/business-profile/merchant-connector--list.mdx Unsupported file format
  api-reference-v2/api-reference/connector-account/connector-account--create.mdx Unsupported file format
  api-reference-v2/api-reference/connector-account/connector-account--delete.mdx Unsupported file format
  api-reference-v2/api-reference/connector-account/connector-account--retrieve.mdx Unsupported file format
  api-reference-v2/api-reference/connector-account/connector-account--update.mdx Unsupported file format
  api-reference-v2/api-reference/merchant-account/business-profile--list.mdx Unsupported file format
  api-reference-v2/api-reference/merchant-account/merchant-account--create.mdx Unsupported file format
  api-reference-v2/api-reference/merchant-account/merchant-account--retrieve.mdx Unsupported file format
  api-reference-v2/api-reference/merchant-account/merchant-account--update.mdx Unsupported file format
  api-reference-v2/api-reference/merchant-account/profile--list.mdx Unsupported file format
  api-reference-v2/api-reference/organization/organization--merchant-account--list.mdx Unsupported file format
  api-reference-v2/api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx Unsupported file format
  api-reference-v2/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx Unsupported file format
  api-reference-v2/api-reference/payment-methods/payment-method--confirm-intent.mdx Unsupported file format
  api-reference-v2/api-reference/payment-methods/payment-method--create-intent.mdx Unsupported file format
  api-reference-v2/api-reference/payment-methods/payment-method--create.mdx Unsupported file format
  api-reference-v2/api-reference/payment-methods/payment-method--delete.mdx Unsupported file format
  api-reference-v2/api-reference/payment-methods/payment-method--retrieve.mdx Unsupported file format
  api-reference-v2/api-reference/payment-methods/payment-method--update.mdx Unsupported file format
  api-reference-v2/api-reference/profile/merchant-connector--list.mdx Unsupported file format
  api-reference-v2/api-reference/profile/profile--activate-routing-algorithm.mdx Unsupported file format
  api-reference-v2/api-reference/profile/profile--deactivate-routing-algorithm.mdx Unsupported file format
  api-reference-v2/api-reference/profile/profile--retrieve-active-routing-algorithm.mdx Unsupported file format
  api-reference-v2/api-reference/profile/profile--retrieve-default-fallback-routing-algorithm.mdx Unsupported file format
  api-reference-v2/api-reference/profile/profile--update-default-fallback-routing-algorithm.mdx Unsupported file format
  api-reference-v2/api-reference/routing/routing--create.mdx Unsupported file format
  api-reference-v2/api-reference/routing/routing--retrieve.mdx Unsupported file format
  api-reference-v2/openapi_spec.json  0% smaller
  crates/api_models/src/organization.rs  0% smaller
  crates/api_models/src/payment_methods.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments.rs  0% smaller
  crates/openapi/src/openapi_v2.rs  0% smaller
  crates/openapi/src/routes/merchant_account.rs  0% smaller
  crates/openapi/src/routes/organization.rs  0% smaller
  crates/openapi/src/routes/payment_method.rs  0% smaller
  crates/openapi/src/routes/profile.rs  0% smaller
  crates/openapi/src/routes/routing.rs  0% smaller
  crates/router/src/routes/payment_methods.rs  0% smaller
  crates/router/src/types/api/admin.rs  0% smaller
  cypress-tests-v2/cypress/support/commands.js  0% smaller

@AnuthaDev AnuthaDev linked an issue Nov 7, 2024 that may be closed by this pull request
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 7, 2024
@AnuthaDev AnuthaDev marked this pull request as ready for review November 13, 2024 09:16
@AnuthaDev AnuthaDev requested review from a team as code owners November 13, 2024 09:16
@AnuthaDev AnuthaDev added the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 13, 2024
crates/api_models/src/payment_methods.rs Outdated Show resolved Hide resolved
crates/openapi/src/routes/payment_method.rs Outdated Show resolved Hide resolved
crates/openapi/src/routes/payment_method.rs Outdated Show resolved Hide resolved
Copy link
Member

@jarnura jarnura left a comment

Choose a reason for hiding this comment

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

Any changes touches v1?

@AnuthaDev
Copy link
Contributor Author

AnuthaDev commented Nov 15, 2024

@jarnura

Any changes touches v1?

Added description for fields in OrganizationResponse

Narayanbhat166
Narayanbhat166 previously approved these changes Nov 15, 2024
pixincreate
pixincreate previously approved these changes Nov 15, 2024
Copy link
Member

@pixincreate pixincreate left a comment

Choose a reason for hiding this comment

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

Cypress changes, LGTM

@pixincreate pixincreate added the S-needs-conflict-resolution Status: This PR needs conflicts to be resolved by the author label Nov 15, 2024
pixincreate
pixincreate previously approved these changes Nov 15, 2024
jarnura
jarnura previously approved these changes Nov 15, 2024

/// Payment Method - Update
///
/// Update an existing payment method of a customer. This API is useful for use cases such as updating the card number for expired cards to prevent discontinuity in recurring payments.
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure we allow this card number update as of now?

@AnuthaDev AnuthaDev dismissed stale reviews from jarnura and pixincreate via 3c8093c November 27, 2024 08:53
@SanchithHegde SanchithHegde removed the S-needs-conflict-resolution Status: This PR needs conflicts to be resolved by the author label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-v2 C-doc Category: Documentation updates M-api-contract-changes Metadata: This PR involves API contract changes S-waiting-on-review Status: This PR has been implemented and needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] V2: Standardise endpoint naming scheme
6 participants