Skip to content

Conversation

@nawarian
Copy link

This pull request

  1. Creates a @SegmentParameter annotation, a meta-annotation that adopts default params for a restler segment param
  2. Makes BaseServiceResource adopt the @SegmentParamter annotation

The problem I'm trying to address

Services like refind use the {segment} path parameter often don't document them. This makes for a broken openapi specs that fails validation of some code generation tools.

This commit adds a @SegmentParameter annotation to make it easier for restler-core dependants to fix
their broken openapi specs.

Next steps

This is less about the restler-core and more about our services. Upon approval of this merge request, I'll send out patches to another project (I'm mostly interested in refind atm) in order to help them fix this issue :)

Where I need your help

I don't really know how to test this, and hopefully I don't need to know 😇 Please have a look and let me know if you spot any problems with this.

Services like refind use the {segment} path parameter
often don't document them. This makes for a broken
openapi specs that fails validation of some code
generation tools.

This commit adds a `@SegmentParameter` annotation to
make it easier for restler-core dependants to fix
their broken openapi specs.
Copy link
Contributor

@rg-sebastian-k rg-sebastian-k left a comment

Choose a reason for hiding this comment

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

Hey @nawarian - thanks for the contribution. Regarding how to test: You can always make a snapshot and update a service to use the snapshot. Then you can inspect the created OpenAPI specs etc.pp.

Keep in mind to update https://github.com/researchgate/restler/blob/master/doc/release-notes.md before releasing.

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.

3 participants