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: ACNA-1756 - config schema changes for integration type apikey #568

Merged
merged 6 commits into from
Sep 9, 2022

Conversation

amulyakashyap09
Copy link
Contributor

Description

Issue:

Expected Behaviour

  • I expect the cli to generate a app builder project
    Actual Behaviour
 ›   Error: Missing or invalid keys in config: [
 ›     {
 ›       "keyword": "required",
 ›       "dataPath": ".project.workspace.details.credentials[0].oauth2",
 ›       "schemaPath": "#/definitions/oauth2/required",
 ›       "params": {
 ›         "missingProperty": "client_secret"
 ›       },
 ›       "message": "should have required property 'client_secret'"
 ›     },
 ›     {
 ›       "keyword": "format",
 ›       "dataPath":
 ›   ".project.workspace.details.credentials[0].oauth2.redirect_uri[0]",
 ›       "schemaPath":
 ›   "#/definitions/oauth2/properties/redirect_uri/items/format",
 ›       "params": {
 ›         "format": "uri"
 ›       },
 ›       "message": "should match format \"uri\""
 ›     }
 ›   ] 

Implementation:

New response will not have oauth2 object block for integration_type = apiKey in credentials array
Instead, it will have apikey = client_id_val directly in the schema
New response

{
  "workspace": {
    "details": {
      "credentials": [
        {
          "id": "Project_id",
          "name": "Project_NAME",
          "integration_type": "apikey",
          "apikey": "client_id_value"
        }
      ]
    }
  }
}

Related Issue

ACNA-1756

Motivation and Context

This is a very critical bugfix to patch breaking app dev

How Has This Been Tested?

  • yarn test
  • Local link with aio-cli

Screenshots (if appropriate):

Screenshot 2022-08-25 at 12 13 52 AM

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #568 (7b4d7c2) into master (1d109cb) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #568   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           50        50           
  Lines         2608      2606    -2     
  Branches       473       473           
=========================================
- Hits          2608      2606    -2     
Impacted Files Coverage Δ
src/lib/import.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shazron shazron marked this pull request as draft August 25, 2022 12:41
@shazron
Copy link
Member

shazron commented Aug 25, 2022

Converted to Draft because this shouldn't get pulled in yet until the backend changes are ready. Once those are ready, we can change the status of this PR.

@shazron shazron changed the title ACNA-1756 | Config Schema Changes for Integration Type ApiKey fix: ACNA-1756 - config schema changes for integration type apikey Aug 25, 2022
@amulyakashyap09 amulyakashyap09 marked this pull request as ready for review August 26, 2022 08:21
@amulyakashyap09 amulyakashyap09 marked this pull request as draft August 26, 2022 08:25
@purplecabbage purplecabbage marked this pull request as ready for review September 9, 2022 00:13
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