Skip to content

fix: remove required indicator from OpenAPI Spec URL field#278

Merged
eguzki merged 1 commit intomainfrom
254-openapi-spec-url-field-validation
Mar 25, 2026
Merged

fix: remove required indicator from OpenAPI Spec URL field#278
eguzki merged 1 commit intomainfrom
254-openapi-spec-url-field-validation

Conversation

@eguzki
Copy link
Copy Markdown
Contributor

@eguzki eguzki commented Mar 25, 2026

Summary

  • Removed the required indicator (asterisk) from the OpenAPI Spec URL field in the Create API Product dialog
  • This fixes the inconsistency where the field showed as required but validation allowed empty submission
  • The field is now consistently optional in both Create and Edit dialogs

Changes

  • Removed required prop from OpenAPI Spec URL TextField in CreateAPIProductDialog
  • Removed associated InputLabelProps that styled the asterisk

Why this approach?

The field is actually optional:

  • The backend only includes openAPISpecURL in the API product when a value is provided
  • The validateURL() function returns null (no error) for empty values
  • The Edit dialog already treats this field as optional (no asterisk shown)

Fixes #254

Test plan

  • Review code changes
  • Manually test Create API Product dialog - verify no asterisk shown for OpenAPI Spec URL
  • Verify form can be submitted without OpenAPI Spec URL value
  • Verify Edit API Product dialog still works correctly (no asterisk shown)
  • Verify URL validation still works when a value is provided

🤖 Generated with Claude Code

The OpenAPI Spec URL field was incorrectly marked as required in the Create API Product dialog, but validation allowed submission without a value. This created confusion between the UI indicator (asterisk) and actual behavior.

Since the field is optional (backend only includes it when provided) and the Edit dialog doesn't show it as required, the fix removes the required prop from the Create dialog for consistency.

Fixes #254

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
@eguzki eguzki linked an issue Mar 25, 2026 that may be closed by this pull request
Copy link
Copy Markdown

@emmaaroche emmaaroche left a comment

Choose a reason for hiding this comment

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

Ran through test plan and all lgtm 👍

@eguzki eguzki added this pull request to the merge queue Mar 25, 2026
Merged via the queue into main with commit 154083d Mar 25, 2026
6 checks passed
@eguzki eguzki deleted the 254-openapi-spec-url-field-validation branch March 25, 2026 11:04
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.

OpenAPI Spec URL Field Validation

2 participants