-
-
Notifications
You must be signed in to change notification settings - Fork 557
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
v3: When Extend is used in ResultType, Attributes are not displayed in OpenAPI document. #2393
Comments
This seems an issue caused by swagger: "2.0"
info:
title: ""
version: ""
host: localhost:80
consumes:
- application/json
- application/xml
- application/gob
produces:
- application/json
- application/xml
- application/gob
paths:
/add/{a}/{b}:
get:
tags:
- calc
summary: add calc
operationId: calc#add
parameters:
- name: a
in: path
description: Left operand
required: true
type: integer
- name: b
in: path
description: Right operand
required: true
type: integer
responses:
"200":
description: OK response.
schema:
$ref: '#/definitions/CalcAddResponseBody'
schemes:
- http
definitions:
CalcAddResponseBody:
title: 'Mediatype identifier: application/vnd.hoge+json; view=default'
type: object
properties:
x:
type: integer
example: 5401762099778430809
format: int64
y:
type: integer
example: 1918630006328122782
format: int64
description: AddResponseBody result type (default view)
example:
x: 4288748512599820841
y: 4212629202012168060 |
#2392 seems related to this. |
This doesn't just affect the documentation, but the actual result as well. I'm not seeing properties included by extended in the response body. Seems like extended properties are not included in the default view generated and are thus not projected onto the final response in gen/{servicename}/service.go |
@tchssk |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
When Extend is used in ResultType, expanded Attribute is not displayed in OpenAPI document.
These Attributes will be displayed if they are specified in View.
There is no problem when using Extend in Payload.
Example design
goa gen openapi.yaml
CalcAddResponseBody
does not containresult
propety.openapi.yaml
Expected
The response body contains the
result
property.openapi.yaml
🤔 Although it is not related to this case, why is only the letter
y
quoted in the above example openapi.yaml?The text was updated successfully, but these errors were encountered: