Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Response is shown prior to Request in PUT action #263

Closed
kkk-f17 opened this issue Mar 15, 2018 · 3 comments
Closed

Response is shown prior to Request in PUT action #263

kkk-f17 opened this issue Mar 15, 2018 · 3 comments
Labels

Comments

@kkk-f17
Copy link

kkk-f17 commented Mar 15, 2018

Hi, in the 'PUT' action, response body is shown prior to request body in the source. Help us to fix this issue. Below is the sample code.

put:
    responses:
        '200':
            content:
                application/json:
                    schema:
                        type: string
                    examples:
                        updateResponse:
                            value:
                                success: 'true'
                                message: 'Account updated Successfully'
    requestBody:
        content:
            application/json:
                examples:
                    'Update account':
                        value:
                            id: '12345'
                            accountName: 'Always welcome'
                            accountBranch: HYD
        required: true
@EricWittmann
Copy link
Member

Hm. You are right. That's a problem with the data model serializer. I thought I had them all in specification order but not for this one. I'll need to go back and verify all of them.

I'll get this fixed soon.

Note, however, that the order doesn't matter from a tooling or documentation generation perspective. It only matters when you look at/edit the source directly.

That said, it should still get fixed.

Thanks for the report.

@EricWittmann
Copy link
Member

OK I've fixed this problem in the data model serializer and have gone through the spec to make sure there weren't any other similar property-ordering problems. I found a couple of other trivial ones and fixed those as well.

You'll see this fix in the next version of Apicurio.

@EricWittmann
Copy link
Member

Fixed by this commit: Apicurio/oai-ts-core@4fa286f

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants