Skip to content

Conversation

@amirejaz
Copy link
Contributor

@amirejaz amirejaz commented Oct 14, 2025

Problem

The export and detail APIs had several inconsistencies that were blocking UI development:

  1. Missing use_pkce attribute in export endpoint responses
  2. PascalCase field names in remote_auth_config violating JSON schema
  3. Inconsistent auth config between export and detail endpoints

Solution

  • Added UsePKCE field to RemoteAuthConfig struct with proper JSON tags
  • Fixed field name casing to use snake_case (use_pkce, client_id, etc.)
  • Updated all conversion functions to include UsePKCE field
  • Ensured both endpoints return identical auth configuration structure

Testing

  • All existing tests pass
  • Verified JSON serialization includes use_pkce field for both true values
  • Confirmed consistent field naming between export and detail endpoints

Impact

  • UI can now reliably access use_pkce field for workload duplication
  • Both export and detail endpoints return consistent JSON structure
  • API responses now match the documented JSON schema

fixes #2188

- Add missing UsePKCE field to RemoteAuthConfig struct
- Fix PascalCase field names in remote_auth_config JSON responses
- Update conversion functions to include UsePKCE field
- Ensure both export and detail endpoints return consistent auth config
@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.12%. Comparing base (df489b6) to head (76213a9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/api/v1/workload_service.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2198      +/-   ##
==========================================
+ Coverage   53.06%   53.12%   +0.05%     
==========================================
  Files         222      222              
  Lines       28913    28916       +3     
==========================================
+ Hits        15344    15361      +17     
+ Misses      12429    12410      -19     
- Partials     1140     1145       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amirejaz amirejaz merged commit 30500cf into main Oct 14, 2025
28 checks passed
@amirejaz amirejaz deleted the export-detail-api-inconsistencies branch October 14, 2025 16:31
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.

Inconsistencies in export/detail endpoints

4 participants