[Feature Request] Swift Support
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- swift
- Ambito
- backend-api-design
Direzione di ricerca
Inizia esaminando le implementazioni esistenti di protovalidate e i riferimenti a SwiftProtobuf, connect-swift e gRPC-Swift indicati nell’issue. Definisci l’ambito per i binding Swift, la validazione a runtime, la compatibilità e un interprete CEL prima di identificare i punti di ingresso per l’implementazione e i test. Il lavoro sarà completato quando l’ambito sarà concordato, sarà disponibile un supporto funzionante per la validazione Swift e saranno presenti i test e la documentazione corrispondenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature description:
Extend the capabilities of the protovalidate library to include support for performing runtime validation of Protocol Buffers messages in Swift projects.
Problem it solves or use case:
The current lack of Swift support in the protovalidate library poses challenges for developers who work with Protocol Buffers and Swift. By introducing Swift support, developers can validate Protocol Buffers messages at runtime within their Swift applications, enhancing data integrity and reducing potential issues related to data validation.
Proposed implementation or solution:
The proposed solution involves extending the existing protovalidate library to incorporate Swift bindings and compatibility. This includes defining Swift structures or classes that mirror Protocol Buffers message structures, and implementing runtime validation functions that align with Swift's strong typing.
Challenges with Enforcing Validation on the Swift Client:
Enforcing validation on the Swift client could introduce challenges due to the widespread impact of validation changes. Swift's strong typing and compile-time safety would necessitate strict adherence to validation rules. However, making validation changes would lead to breaking changes on both the client and server sides. Any update to validation rules could result in inconsistencies between the client and server if they're not synced properly. This would require maintaining compatibility across different versions of the Protocol Buffers definitions, which could become a complex and error-prone task.
Importance of a CEL Interpreter for Advanced Validation:
To address these challenges, an integral part of the solution would involve creating a CEL (Common Expression Language) interpreter for Swift. CEL allows for the specification of complex validation rules in an expressive and language-agnostic manner. This interpreter would be instrumental in enabling advanced validation expressions that can be used within the protovalidate library. Given that a CEL interpreter for Swift is not currently under development an effort would need to be undertaken to create this
Contribution:
I am enthusiastic about contributing to this feature by participating in discussions, assisting in defining Swift type structures, collaborating on the implementation of runtime validation functions for Swift, and potentially contributing to the development of the CEL interpreter for Swift. I am also willing to help with writing tests and documentation to ensure comprehensive coverage and guidance.
Examples or references:
While protovalidate does not currently offer Swift support, libraries like connect-swift, SwiftProtobuf and gRPC-Swift can provide insights into integrating Protocol Buffers messages into Swift projects.
Additional context:
Adding Swift support to the protovalidate library will cater to developers who use Protocol Buffers in Swift applications, allowing them to perform runtime validation without the need for external code generation. The creation of a CEL interpreter for Swift would further enhance the validation capabilities of the library, enabling advanced validation expressions to be used seamlessly across languages.
- Lingua principale
- Go
- Stelle
- 1.6k
- Fork
- 67
- Merge medio
- 1g 10h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bufbuild/protovalidate
-
Feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
bufbuild/protovalidate#538 ·
-
[BUG] Hostname rule rejects a 253-character name with a trailing dot, which the docs say is validAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
bufbuild/protovalidate#512 · 2 commenti ·
-
Feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
bufbuild/protovalidate#490 · 1 commento ·
-
Feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
bufbuild/protovalidate#486 · 11 commenti ·
-
Feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
bufbuild/protovalidate#485 ·
Tutte le issue di bufbuild/protovalidate
Issue simili
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:session-state issue-rating: 🦞 diamond lobster no-stale P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
openclaw/wacli#503 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
apache/rocketmq-dashboard#6895 ·
I maintainer di solito rispondono entro 3 giorni
-
agent-butler-finding chore
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
jordansmall/spindrift#5466 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
open-telemetry/opentelemetry-go-compile-instrumentation#1507 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
777genius/agent-notifications#490 ·
I maintainer di solito rispondono entro 1 giorno