Skip to content

Comments

Add support for ffextensions#208

Open
chrisbygrave wants to merge 3 commits intohyperledger:mainfrom
chrisbygrave:ff-openapi-extensions
Open

Add support for ffextensions#208
chrisbygrave wants to merge 3 commits intohyperledger:mainfrom
chrisbygrave:ff-openapi-extensions

Conversation

@chrisbygrave
Copy link
Contributor

This PR adds support for a gostruct tag ffextensions that 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 format x-<name>.

For example, the following structure:

type TestExtensions struct {
	MyString string `ffstruct:"mystruct" json:"mystring" ffextensions:"x-key=value"`
}

Would generate a schema:

mystring:
  description: mystruct.mystring
  type: string
  x-key: value

- a go struct tag that enables extensions to be introduced to the generated OpenAPI documents

Signed-off-by: Chris Bygrave <chris.bygrave@kaleido.io>
@chrisbygrave chrisbygrave requested a review from a team as a code owner February 17, 2026 15:22
Copy link
Contributor

@EnriqueL8 EnriqueL8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - a question and needs gofmt formatting

chrisbygrave and others added 2 commits February 17, 2026 16:49
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>
Copy link
Contributor

@EnriqueL8 EnriqueL8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @chrisbygrave - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants