Skip to content

Conversation

javuto
Copy link
Collaborator

@javuto javuto commented May 31, 2025

Adding new endpoint in osctrl-api to look up nodes by identifier (UUID, hostname or localname). Also updating the OpenAPI YAML to keep documentation up to date.

@javuto javuto requested a review from Copilot May 31, 2025 21:23
@javuto javuto added ✨ enhancement New feature or request osctrl-api osctrl-api related changes labels May 31, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

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 introduces a new endpoint in osctrl-api that allows looking up nodes by various identifiers and updates the OpenAPI documentation accordingly.

  • Added the ApiLookupRequest and ApiLookupResponse types in pkg/types/types.go.
  • Updated the osctrl-api YAML to include the new /nodes/lookup POST endpoint.
  • Implemented LookupNodeHandler and added a helper to convert node objects to lookup responses.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/types/types.go Introduces types for lookup requests and responses
osctrl-api.yaml Adds new documentation for the /nodes/lookup endpoint
cmd/api/main.go Registers the new lookup route in the API
cmd/api/handlers/utils.go Adds helper for converting nodes into lookup response format
cmd/api/handlers/nodes.go Implements the LookupNodeHandler

@javuto javuto merged commit 42c0be1 into main May 31, 2025
54 checks passed
@javuto javuto deleted the api-lookup-identifier branch May 31, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request osctrl-api osctrl-api related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant