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

🐞SPFx - Update package-solution.json's schema to include optional properties for webApiPermissionRequests #8363

Closed
1 of 9 tasks
andrewconnell opened this issue Aug 10, 2022 · 3 comments
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@andrewconnell
Copy link
Collaborator

andrewconnell commented Aug 10, 2022

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

No response

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • SPFx v1.15.2 projects

Describe the bug / error

The schema for ./config/package-solution.json, https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json, is missing optional properties on objects in the webApiPermissionRequests array introduced in SPFx v1.15.2: appId & replyUrl.

This means developers won't get IntelliSense with included docs when editing this file. In fact, the file will fail validation as it currently contains additionalProperties: false which will say the properties aren't allowed:

Screen Shot 2022-08-10 at 3 37 28 PM

Steps to reproduce

  1. Create new project

  2. Use any type of component when prompted

  3. Open said project in VSCode

  4. Open ./config/package-solution.json

  5. Add the following code after the developer property:

    "webApiPermissionRequests": [
      {
        "scope": "", "resource": "", "appId": "asd", "replyUrl": "https://foo.com/endpoint"
      }
    ],
  6. Developer curses at VSCode and 😭 in solitude... kittens rush for safety to avoid being kicked by said developer.

Expected behavior

  1. Create new project

  2. Use any type of component when prompted

  3. Open said project in VSCode

  4. Open ./config/package-solution.json

  5. Add the following code after the developer property:

    "webApiPermissionRequests": [
      {
        "scope": "", "resource": "", "appId": "asd", "replyUrl": "https://foo.com/endpoint"
      }
    ],
  6. Observe IntelliSense when modifying values under the included webApiPermissionRequests

  7. The Microsoft engineer who took the time to update this file, on their way home from work to enjoy a good streaming movie, when picking up their take-out tacos 🌮, comes to find out someone paid it forward as thanks and now they enjoy free 🌮 for their contribution to developers across the globe.

@andrewconnell andrewconnell added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Aug 10, 2022
@ghost
Copy link

ghost commented Aug 10, 2022

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 Awaiting categorization and initial review. label Aug 10, 2022
@AJIXuMuK
Copy link
Collaborator

Thanks @andrewconnell for reporting it!
the issue is now fixed.

@ghost
Copy link

ghost commented Aug 24, 2022

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@SharePoint SharePoint locked as resolved and limited conversation to collaborators Aug 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

2 participants