Skip to content

feat(extensions): validate schema options - #167

Merged
migmartri merged 1 commit into
chainloop-dev:mainfrom
migmartri:expand-schema
Jun 14, 2023
Merged

feat(extensions): validate schema options#167
migmartri merged 1 commit into
chainloop-dev:mainfrom
migmartri:expand-schema

Conversation

@migmartri

@migmartri migmartri commented Jun 14, 2023

Copy link
Copy Markdown
Member

Put limitations on the structs that can be used to generate an extension schema.

For example, now

  • Nested structs are not allowed
  • Array types are not supported either.

To achieve the first point, now we generate the schema flat.

refs #38

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

// generate a JSON schema from a struct, see
// generate a flat JSON schema from a struct using https://github.com/invopop/jsonschema
// We've put some limitations on the kind of input structs we support, for example:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That is a very good point!

@migmartri
migmartri merged commit 5f69f4f into chainloop-dev:main Jun 14, 2023
@migmartri
migmartri deleted the expand-schema branch June 14, 2023 17:17
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