Update nodeinfo #446

Fusionnée
zcdunn a fusionné 4 révision(s) à partir de update_nodeinfo_433 vers master il y a 5 ans
zcdunn a commenté il y a 5 ans (Migré de github.com)

Fix #433

I added the repo link to Cargo.toml so that software.repository could be configurable like @rhaamo suggested. I don't know if it's ok to include software.repository without bumping the schema version, but I didn't know if that would break any clients that parse nodeinfo with a hardcoded schema version.

Fix #433 I added the repo link to Cargo.toml so that `software.repository` could be configurable like @rhaamo suggested. I don't know if it's ok to include `software.repository` without bumping the schema version, but I didn't know if that would break any clients that parse nodeinfo with a hardcoded schema version.
rhaamo a commenté il y a 5 ans (Migré de github.com)

software.repository is nodeinfo 2.1 only, you can however have 2.0 and 2.1 side by side, only the json for 2.1 will returns the repository key.

But that will introduce another thing to do, plume use https://xxx/nodeinfo so it would need to became https://xxx/nodeinfo/version or something like that.

keeping 2.0 would be good anyway for compatibility.

and for the schema version, if you add repository in a 2.0 version it will break on any parser forcing a validation, since 2.0 schema doesn't allow repository.

`software.repository` is nodeinfo 2.1 only, you can however have 2.0 and 2.1 side by side, only the json for 2.1 will returns the repository key. But that will introduce another thing to do, plume use `https://xxx/nodeinfo` so it would need to became `https://xxx/nodeinfo/version` or something like that. keeping 2.0 would be good anyway for compatibility. and for the schema version, if you add repository in a 2.0 version it will break on any parser forcing a validation, since 2.0 schema doesn't allow repository.
zcdunn a commenté il y a 5 ans (Migré de github.com)

Ok. I'll update that. Is it ok to make it two separate endpoints, /nodeinfo/2.0 and /nodeinfo/2.1 since those are the only ones we provide or should the version be parameterized?

Ok. I'll update that. Is it ok to make it two separate endpoints, `/nodeinfo/2.0` and `/nodeinfo/2.1` since those are the only ones we provide or should the version be parameterized?
codecov[bot] a commenté il y a 5 ans (Migré de github.com)

Codecov Report

Merging #446 into master will decrease coverage by 0.12%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #446      +/-   ##
==========================================
- Coverage   25.58%   25.45%   -0.13%     
==========================================
  Files          63       63              
  Lines        6254     6285      +31     
==========================================
  Hits         1600     1600              
- Misses       4654     4685      +31
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/446?src=pr&el=h1) Report > Merging [#446](https://codecov.io/gh/Plume-org/Plume/pull/446?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/64d1944715a3fbcb5244f0b94d16eae3b0dd7d7e?src=pr&el=desc) will **decrease** coverage by `0.12%`. > The diff coverage is `0%`. ```diff @@ Coverage Diff @@ ## master #446 +/- ## ========================================== - Coverage 25.58% 25.45% -0.13% ========================================== Files 63 63 Lines 6254 6285 +31 ========================================== Hits 1600 1600 - Misses 4654 4685 +31 ```
elegaanz a commenté il y a 5 ans (Migré de github.com)

Thank you! For the versions, adding a parameter in the route could indeed do the job. And I'm not sure the json! macro allows it, but if possible only add the repository field if the requested version is 2.1

Thank you! For the versions, adding a parameter in the route could indeed do the job. And I'm not sure the `json!` macro allows it, but if possible only add the repository field if the requested version is 2.1
elegaanz (Migré de github.com) ces changements ont été approuvés il y a 5 ans
elegaanz (Migré de github.com) laisser un commentaire

Thank you! 👍

Thank you! :+1:

Relecteurs

La demande d'ajout a été fusionnée en 7bac70a483.
Vous pouvez également voir les instructions en ligne de commande.

Étape 1:

Depuis le dépôt de votre projet, sélectionnez une nouvelle branche et testez les modifications.
git checkout -b update_nodeinfo_433 master
git pull origin update_nodeinfo_433

Étape 2:

Fusionner les modifications et mettre à jour sur Forgejo.
git checkout master
git merge --no-ff update_nodeinfo_433
git push origin master
Connectez-vous pour rejoindre cette conversation.
Aucune évaluation
Aucun jalon
Pas d'assignataires
1 participants
Notifications
Échéance
La date d’échéance est invalide ou hors plage. Veuillez utiliser le format 'aaaa-mm-dd'.

Aucune échéance n'a été définie.

Dépendances

No dependencies set.

Reference: Plume/Plume#446
Chargement…
Il n'existe pas encore de contenu.