Skip to content

Adds schema descriptions to SwaggerUI#45

Open
AugmenTab wants to merge 1 commit intomainfrom
tbaum/add-schema-description
Open

Adds schema descriptions to SwaggerUI#45
AugmenTab wants to merge 1 commit intomainfrom
tbaum/add-schema-description

Conversation

@AugmenTab
Copy link
Contributor

This uses the schema descriptions added in a recent json-fleece update to the SwaggerUI so it renders along with the schema.

A golden test has been added to show that the descriptions for both an object and its fields are included in the generated OpenAPI document. This was also tested with an external project using orb to see that the SwaggerUI page includes the description.

This uses the schema descriptions added in a recent `json-fleece`
update to the SwaggerUI so it renders along with the schema.

A golden test has been added to show that the descriptions for
both an object and its fields are included in the generated OpenAPI
document. This was also tested with an external project using `orb`
to see that the SwaggerUI page includes the description.
FleeceOpenApi mkErrOrSchemaInfo = FC.schemaInterpreter schema

schemaInfo <- mkErrOrSchemaInfo []
schemaInfo <- applySchemaDescription schema <$> mkErrOrSchemaInfo []
Copy link
Member

Choose a reason for hiding this comment

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

It feels bad that we have to add applySchemaDescription in so many places. Can this be avoided somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see any way to avoid it, but I'm open to discussing it.

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