Skip to content
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

Importing OpenApi3: Ignore fields marked as readOnly when generating… #1618

Merged
merged 1 commit into from Aug 5, 2019

Conversation

@easen-amp
Copy link
Contributor

commented Aug 5, 2019

… request bodies

When importing OAS3.0 specifications Insomnia includes the readOnly fields in the example requests.

References:-
https://swagger.io/specification/#schemaObject
swagger-api/swagger-ui#3445 (similar issue in swagger-ui)

This is my first PR to your project, so please be kind :) I couldn't find an open issue for this - perhaps readOnly is such a new feature, people haven't come across this before.

@welcome

This comment has been minimized.

Copy link

commented Aug 5, 2019

💖 Thanks for opening this pull request! 💖

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

id:
type: integer
format: int64
readOnly: true

This comment has been minimized.

Copy link
@easen-amp

easen-amp Aug 5, 2019

Author Contributor

Updating the id to be "readOnly"

"url": "{{ base_url }}/pets",
"body": {
"mimeType": "application/json",
"text": "{\n \"name\": \"string\",\n \"tag\": \"string\"\n}"

This comment has been minimized.

Copy link
@easen-amp

easen-amp Aug 5, 2019

Author Contributor

id is not returned in the body as it's readOnly

@easen-amp easen-amp changed the title feat(oas3 readonly): ignore fields marked as readOnly when generating… Importing OpenApi3: Ignore fields marked as readOnly when generating… Aug 5, 2019

@gschier

gschier approved these changes Aug 5, 2019

Copy link
Collaborator

left a comment

This is awesome! Thanks so much for putting this one together @easen-amp 😃🎉

@gschier gschier merged commit 3e1ac1f into getinsomnia:develop Aug 5, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@welcome

This comment has been minimized.

Copy link

commented Aug 5, 2019

Congrats on merging your first pull request! 🎉🎉🎉 You're helping make Insomnia awesome! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.