API - Filter by version - Specifying both minimum and maximum version returns no results

Offen
#270 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
powershell
Bereich
api

Rechercherichtung

Start by tracing how the gallery API handles the FindPackagesById() request and applies the NormalizedVersion filters. Reproduce the supplied Find-PSResource query, then compare results with queries using only a minimum or maximum version. Done means specifying both bounds returns versions greater than 9.0.0 and less than 10.0.0; the issue does not name relevant source files or tests.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Steps to reproduce

I found this bug when I discovered following related issue:

If you with PSResourceGet do:

  • Find-PSResource -Repository 'PSGallery' -Name 'Az' -Version '(9,10)'

This produces API request:

  • https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Az'&$orderby=NormalizedVersion desc&$inlinecount=allpages&$skip=0&$filter=IsPrerelease eq false and Id eq 'Az' and NormalizedVersion gt '9.0.0' and NormalizedVersion lt '10.0.0'

Which should return all versions of Az newer than 9.0.0 and older than 10.0.0.

Expected behavior

Should get all versions of Az newer than v9.0.0 and older than v10.0.0.

Actual behavior

No versions get returned.

Error details

No response

Environment data
Not relevant, API.
Version

Not relevant, API.

Visuals

No response

Vorherrschende Sprache
PowerShell
Sterne
289
Forks
83
Ø Merge
1 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus PowerShell/PowerShellGallery

Alle Issues in PowerShell/PowerShellGallery

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.