Skip to content

using custom server urls for collection generation#951

Open
AyushShri wants to merge 1 commit into
developfrom
feature/custom-server-url-fix
Open

using custom server urls for collection generation#951
AyushShri wants to merge 1 commit into
developfrom
feature/custom-server-url-fix

Conversation

@AyushShri

Copy link
Copy Markdown
Collaborator

using custom server urls for collection generation

@github-actions

Copy link
Copy Markdown
Contributor

integration test code coverage

Lines Statements Branches Functions
Coverage: 20%
19.73% (2116/10724) 13.43% (1002/7458) 20.73% (248/1196)
Coverage Breakdown • (20%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files19.7313.4320.7320.03 
libV2/CollectionGeneration5.54005.6 
   schemaUtils.js7.82007.89...2767, 2780–2840

@github-actions

Copy link
Copy Markdown
Contributor

unit test code coverage

Lines Statements Branches Functions
Coverage: 89%
88.97% (5890/6620) 80.79% (3857/4774) 94.02% (866/921)
Coverage Breakdown • (89%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files88.9780.7994.0289.08 
libV2/CollectionGeneration90.982.4895.0590.94 
   schemaUtils.js9488.3399.0394.24...2645–2651, 2697

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates type-extraction identifiers so extractedTypes keys reflect the resolved request path when an operation overrides the server URL (including server URL path segments), ensuring type data can be mapped back to generated requests.

Changes:

  • Include operation-level server URL path segments in extractedTypes request identifiers by deriving the key from Url#getPath(true) when a server override is present.
  • Extend base URL resolution to return the serverObj to support override detection.
  • Add/adjust unit tests to validate extractedTypes keys for operation-level server overrides (including path segments and server variables).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/unit/convertV2WithTypes.test.js Updates expectations and adds coverage for extractedTypes keys when operation-level servers add path segments.
libV2/CollectionGeneration/schemaUtils.js Adjusts request identifier generation to use the resolved URL path when an operation-level server override is present.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

paths: {
'/profile-preferences': {
get: {
servers: [{ url: 'https://apiintqa.hmhs.com/eslsvc/api/v3' }],
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.

2 participants