-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MARXAN-353] [MARXAN-482] [MARXAN-483] geo features: POST and PUT interface #288
[MARXAN-353] [MARXAN-482] [MARXAN-483] geo features: POST and PUT interface #288
Conversation
This pull request is being automatically deployed with Vercel (learn more). marxan – ./app🔍 Inspect: https://vercel.com/vizzuality1/marxan/7HXvWyLhHDQinC2XdoGwdKaHtJKt marxan-storybook – ./app🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/E88kicEDfLfmfktFtV74jyUatS5A |
@ApiCreatedResponse({ type: ScenarioResult }) | ||
@Post(':id/features/specification') | ||
async createFeatureSetFor( | ||
@Body(new ValidationPipe()) dto: CreateGeoFeatureSetDTO, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dyostiq I've seen you giving advanced suggestions for Swagger documentation - this is a WIP, but your feedback would be appreciated: here and in the following endpoint we use DTOs that themselves use union types with class-transformer discriminators for nested validation, which from what I understand and see don't play well with the kind of introspectioni the Swagger plugin could do... short of not using union types and adding some duplication, would you have suggestions for the Swagger documentation to reflect the full shape of DTOs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, for unions/polymorphic type you may use oneOf
(along with getSchemaPath
) and discriminator
property of ApiProperty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(and ApiExtraModels
in order to have the model referenced by getSchemaPath
included in the open api doc)
d9c34ee
to
7b4cb98
Compare
7b4cb98
to
717ec95
Compare
It turns out to be quite handy when processing geofeature specifications.
595a208
to
7aeeb75
Compare
see https://vizzuality.atlassian.net/browse/MARXAN-182