~phw/musicbrainz

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 3

[PATCH go-musicbrainzws2 0/1] Bad parsing of the Relation model returned by the API

Details
Message ID
<172750741298.714.10691721253150774227-0@git.sr.ht>
DKIM signature
missing
Download raw message
Hello, sorry for the possible inconvenience but I noticed while doing
tests that the `Relation` model had an error in the decoded JSON part.

This small patch renames the three JSON tags concerned with the correct
corresponding ones.

If you wanted to check for yourself that the MusicBrainz JSON does not
contain `s` for `attribute-ids`, `attribute-values` and `attribute-
credits`.

Here is an example link
https://musicbrainz.org/ws/2/recording/bf6520b5-f437-4736-9f29-f5dee53adc5e?inc=artist-
rels&fmt=json

Thank you for reading
Sincerely Gungun974

Gungun974 (1):
  Fix wrong Relation model Attributes parsing

 models.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.45.2

[PATCH go-musicbrainzws2 1/1] Fix wrong Relation model Attributes parsing

Details
Message ID
<172750741298.714.10691721253150774227-1@git.sr.ht>
In-Reply-To
<172750741298.714.10691721253150774227-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Patch: +3 -3
From: Gungun974 <xfelix974@gmail.com>

---
 models.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/models.go b/models.go
index 997e9f1..3cf60ef 100644
--- a/models.go
+++ b/models.go
@@ -720,9 +720,9 @@ type Relation struct {
	Direction        string            `json:"direction"`
	OrderingKey      int               `json:"ordering-key"`
	Attributes       []string          `json:"attributes"`
	AttributeIDs     map[string]MBID   `json:"attributes-ids"`
	AttributeCredits map[string]string `json:"attributes-credits"`
	AttributeValues  map[string]string `json:"attributes-values"`
	AttributeIDs     map[string]MBID   `json:"attribute-ids"`
	AttributeCredits map[string]string `json:"attribute-credits"`
	AttributeValues  map[string]string `json:"attribute-values"`
	Area             *Area             `json:"area,omitempty"`
	Artist           *Artist           `json:"artist,omitempty"`
	Event            *Event            `json:"event,omitempty"`
-- 
2.45.2

[go-musicbrainzws2/patches/.build.yml] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<D4HQ9VZWT68J.38WXBK0GZR200@fra01>
In-Reply-To
<172750741298.714.10691721253150774227-1@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
go-musicbrainzws2/patches/.build.yml: FAILED in 13s

[Bad parsing of the Relation model returned by the API][0] from [~gungun974][1]

[0]: https://lists.sr.ht/~phw/musicbrainz/patches/55228
[1]: xfelix@me.com

✗ #1339095 FAILED go-musicbrainzws2/patches/.build.yml https://builds.sr.ht/~phw/job/1339095
Details
Message ID
<5079c062-23c1-4ab3-aa68-ebd8cf2d7d39@uploadedlobster.com>
In-Reply-To
<172750741298.714.10691721253150774227-0@git.sr.ht> (view parent)
DKIM signature
pass
Download raw message
Am 28.09.24 um 09:10 schrieb ~gungun974:
> Hello, sorry for the possible inconvenience but I noticed while doing
> tests that the `Relation` model had an error in the decoded JSON part.

Thank you very much for the patch. Looks like some copy and paste gone 
wrong. I have applied your patch and tagged a new release.

Philipp
Reply to thread Export thread (mbox)