Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Simple filterExpression with constraint does not work (BusinessPartnerNumber = "something")

Aperta
#430 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Ambito
api

Direzione di ricerca

Inizia con POST /management/v3/policydefinitions/request e riproduci l'errore di validazione di BusinessPartnerNumber usando EDC 0.7.3. Confronta il comportamento dell'endpoint con la specifica Swagger collegata di Tractus-X EDC 0.8.0-rc3 e traccia la validazione dello schema PolicyDefinition segnalata. Il lavoro è considerato completato quando i campi filtro supportati e il comportamento specifico della versione sono identificati e documentati o corretti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Current Behavior

Hi all! I'm creating an access policy to be used among some of my contracts, and I want to re-use the same policy for some of them. I'm able to create the policy with the following request body:

{
  "@context": {
    "@vocab": "https://w3id.org/edc/v0.0.1/ns/",
  },
  "@id": "{{POLICY_DEFINITION_ID}}",
  "policy": {
    "@context": "http://www.w3.org/ns/odrl.jsonld",
    "@type": "Set",
    "@id": "{{POLICY_DEFINITION_ID}}",
    "odrl:permission": [
      {
        "odrl:action": "USE",
        "odrl:constraint": {
            "@type": "LogicalConstraint",
            "odrl:and": [{
                "@type": "Constraint",
              "odrl:leftOperand": "BusinessPartnerNumber",
              "odrl:operator": {
                "@id": "odrl:eq"
              },
              "odrl:rightOperand": "BPNL123"
            }]   
        }
      }
    ]
  }
}

Which gives me an IdResponse like:

{
    "@type": "IdResponse",
    "@id": "4fe7d4f3-9890-4cd9-9e1e-671faf8ba39b",
    "createdAt": 1726832897018,
    "@context": {
        "@vocab": "https://w3id.org/edc/v0.0.1/ns/",
        "edc": "https://w3id.org/edc/v0.0.1/ns/",
        "tx": "https://w3id.org/tractusx/v0.0.1/ns/",
        "tx-auth": "https://w3id.org/tractusx/auth/",
        "cx-policy": "https://w3id.org/catenax/policy/",
        "odrl": "http://www.w3.org/ns/odrl/2/"
    }
}

When I try to query by its ID using POST /management/v3/policydefinitions/request, it works seamsly:
image

However, the same query does not work when I try to query it by its BusinessPartnerNumber:
image

It brings back this Error validating schema: Field BusinessPartnerNumber not found on type class org.eclipse.edc.connector.controlplane.policy.spi.PolicyDefinition.

Where can I find this validation schema details? I was browsing the current repository but could not find anything mentioning that, nor the Swagger has any example for such.

I'm following the Swagger specs are provided in the following link:
https://app.swaggerhub.com/apis/eclipse-tractusx-bot/tractusx-edc/0.8.0-rc3

My EDC is on version 0.7.3.

Thank you all!

Lingua principale
HCL
Stelle
19
Fork
33
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-tractusx/tutorial-resources

Tutte le issue di eclipse-tractusx/tutorial-resources

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.