Skip to content

Schema: Remove useless json tags#85

Merged
ILL1A merged 1 commit into
mainfrom
m-74-json
Jun 9, 2025
Merged

Schema: Remove useless json tags#85
ILL1A merged 1 commit into
mainfrom
m-74-json

Conversation

@ILL1A
Copy link
Copy Markdown
Contributor

@ILL1A ILL1A commented Jun 9, 2025

Closes #74.

@ILL1A ILL1A requested a review from Copilot June 9, 2025 09:38
Copy link
Copy Markdown

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 removes the JSON struct field tags from several schema files in order to clean up the Go structures and avoid unused metadata.

  • Removed JSON tags from protocol, peer, hello, entry, and event schema structures.
  • Updated inline tags in resolver structures to use only YAML annotations.

Reviewed Changes

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

Show a summary per file
File Description
internal/network/net/schema/protocol.go Removed JSON tags from Header, Preamble, and Frame
internal/network/net/schema/peer.go Removed JSON tags from PeerMetadata fields
internal/network/net/schema/hello.go Removed JSON tags from ClientHello, ServerHello, and ClientHelloAck
internal/network/net/schema/entry.go Removed JSON tag from EntryHeader field
internal/event/event.go Removed JSON tags (and omitempty options) from event structures
internal/commander/resolver/resolver.go Removed JSON inline tags from embedded schema types
Comments suppressed due to low confidence (2)

internal/event/event.go:137

  • Removing the 'omitempty' option from the Error field may lead to unintended JSON serialization behavior if nil errors need to be omitted. Verify that this change matches the intended API design and serialization logic.
Error error

internal/commander/resolver/resolver.go:13

  • The removal of the JSON inline tag from the embedded PeerMetadata may affect JSON serialization if it is in use. Confirm that YAML is the only intended serialization format for this structure.
schema.PeerMetadata `yaml:",inline"`

@ILL1A ILL1A merged commit ad4d20f into main Jun 9, 2025
3 checks passed
@ILL1A ILL1A deleted the m-74-json branch June 9, 2025 09:41
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.

Config: Remove useless JSON tags

2 participants