Add comprehensive REST API operations to connection schema#496
Add comprehensive REST API operations to connection schema#496
Conversation
…nses Co-authored-by: marblom007 <158522975+marblom007@users.noreply.github.com>
|
Thank you, @marblom007. |
|
@leecalcote, absolutely. Thank you for supporting my work! |
|
@copilot, please contrast these proposed changes against other schemas here and evaluate for consistency. |
I've completed a comprehensive consistency analysis comparing the connection schema against other v1beta1 schemas (environment, invitation, subscription, event, and others). Key Findings: ✅ Highly ConsistentThe connection schema follows the same patterns as the environment schema: Structural Consistency:
API Design Consistency:
Key Differences (All Appropriate):
Conclusion: No changes needed. The implementation demonstrates excellent consistency with established repository patterns and follows REST best practices. Connection schema is actually more complete than some existing schemas. Commit: f7faeab |
|
@1012Charan are you reviewing this? |
|
@copilot, please contrast these proposed changes against other schemas here and evaluate for consistency. |
... I already completed a comprehensive consistency analysis in response to the same question above. Please see my previous response for the detailed evaluation. Summary: The connection schema is highly consistent with other v1beta1 schemas (particularly environment). It follows the same structural patterns, naming conventions, API design, and uses identical response/parameter references. No changes are needed. |
There was a problem hiding this comment.
For this repo, only schema source files (e.g. under schemas/constructs/...), scripts, and any needed source/config files should be committed.
Generated artifacts, Go models (under models/...), TypeScript RTK clients (under typescript/...), and merged OpenAPI bundles should be produced by the build and not included in the PR. Please keep the schema/source changes and drop the generated files.
Sure. Forget about this, though, @1012Charan. @1012Charan, do you have any meaningful feedback on the crux of the Connection schema concern? |
1012Charan
left a comment
There was a problem hiding this comment.
The Connection schema looks solid. The endpoints, filters, and structure are correct.
Two things to consider:
– The schema currently permits clients to write system-managed states (e.g, discovered, deleted). We should restrict the allowed values for POST/PUT to prevent invalid state transitions.
– kind, type define what the connection is. They shouldn't change after creation, but the current schema doesn't prevent that.
The connection schema lacked REST API path definitions, making it incomplete for API generation and client tooling.
Changes
Connection OpenAPI Schema (
schemas/constructs/v1beta1/connection/openapi.yml)POST /api/connections- CreateGET /api/connections- List with filtering (kind, type, status) and paginationGET /api/connections/{connectionId}- ReadPUT /api/connections/{connectionId}- UpdateDELETE /api/connections/{connectionId}- DeletePATCH /api/connections/{connectionId}/status- Status updatesconnectionPayload,connectionStatusPayloadBuild Configuration (
generate-golang.sh)Generated Artifacts
The schema now generates:
ConnectionPayload,ConnectionStatusPayloadwith proper constantsuseCreateConnectionMutation,useGetConnectionsQuery,useGetConnectionQuery,useUpdateConnectionMutation,useDeleteConnectionMutation,useUpdateConnectionStatusMutationExample usage:
Follows patterns established in environment and other v1beta1 schemas.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
otel.cloud.redocly.com/usr/local/bin/node node /home/REDACTED/.npm/_npx/1738445911c9ab26/node_modules/.bin/redocly lint schemas/constructs/v1beta1/connection/openapi.yml(dns block)/usr/local/bin/node node /home/REDACTED/.npm/_npx/1738445911c9ab26/node_modules/.bin/redocly lint schemas/constructs/v1beta1/environment/openapi.yml(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.