Add support for ffschemaext#208
Merged
peterbroadhurst merged 5 commits intohyperledger:mainfrom Mar 4, 2026
Merged
Conversation
- a go struct tag that enables extensions to be introduced to the generated OpenAPI documents Signed-off-by: Chris Bygrave <chris.bygrave@kaleido.io>
EnriqueL8
reviewed
Feb 17, 2026
Co-authored-by: Enrique Lacal <enrique.lacal@kaleido.io> Signed-off-by: Chris Bygrave <chris.bygrave@kaleido.io>
Signed-off-by: Chris Bygrave <chris.bygrave@kaleido.io>
EnriqueL8
approved these changes
Feb 20, 2026
Contributor
EnriqueL8
left a comment
There was a problem hiding this comment.
Looks good to me @chrisbygrave - thanks!
Contributor
peterbroadhurst
left a comment
There was a problem hiding this comment.
Couple of thoughts here @chrisbygrave
- ffextensions -> ffschemaext - use query-like format with well-defined escaping strategy Signed-off-by: Chris Bygrave <chris.bygrave@kaleido.io>
Contributor
Author
|
Thanks for the steer @peterbroadhurst - I've updated the PR to support query syntax parsing, and added a couple of tests to catch encoding issues. I've also switched out |
Signed-off-by: Chris Bygrave <chris.bygrave@kaleido.io>
Contributor
Author
|
Worth noting that if the same property is specified multiple times, the last value will win - I think that's cleaner behaviour than introducing some arbitrary join character in an attempt to consolidate multiple values down to one. |
peterbroadhurst
approved these changes
Mar 4, 2026
Contributor
peterbroadhurst
left a comment
There was a problem hiding this comment.
Thanks @chrisbygrave for going round the loop on the spelling and escaping semantics
ffschemaext
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for a gostruct tag
ffschemaextthat allows a comma-separated list of key/value pairs to be added as extensions to the schema generated into the OpenAPI document. Keys must be of the formatx-<name>.For example, the following structure:
Would generate a schema:
Query string syntax (and escaping rules) can be used to add multiple extension to a single field: