swagger-api / swagger-api/swagger-codegen

[Apex] Use NamedCredentials/Callouts instead of remoteSite

Open
#5,679 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Apex Enhancement: General help wanted
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

The initial implementation for Apex supports only remote site settings. That leads to the issue that the developer has to hardcode authentication credentials into the Apex classes.

The best approach is to use Named Credentials in combination with callouts. With that an administration can define URL/Credentials etc. via UI in Salesforce and nothing needs to be hardcoded in the Apex classes.

Swagger-codegen version

master

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Apex generator templates and their existing remote-site configuration and callout handling. Review how generated Apex clients are tested, then define the Named Credentials and callout behavior required for administrators to provide URLs and credentials without hardcoded authentication.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.