{"id":15091496,"url":"https://github.com/wantedly/open_api","last_synced_at":"2025-04-12T06:30:58.558Z","repository":{"id":44637743,"uuid":"131684706","full_name":"wantedly/open_api","owner":"wantedly","description":"Provide PORO and serializers for OpenAPI v3.0.1","archived":false,"fork":false,"pushed_at":"2023-12-15T05:09:30.000Z","size":122,"stargazers_count":9,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T22:44:19.657Z","etag":null,"topics":["oas","oas3","openapi"],"latest_commit_sha":null,"homepage":"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wantedly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-01T06:47:00.000Z","updated_at":"2023-11-10T07:38:06.000Z","dependencies_parsed_at":"2023-12-15T06:26:41.355Z","dependency_job_id":"4de7b170-511f-4524-a7c6-83407b28a01e","html_url":"https://github.com/wantedly/open_api","commit_stats":{"total_commits":148,"total_committers":6,"mean_commits":"24.666666666666668","dds":0.07432432432432434,"last_synced_commit":"510c780ef1432cbfed53e068594407670c253cfd"},"previous_names":["ngtk/open_api"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wantedly%2Fopen_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wantedly%2Fopen_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wantedly%2Fopen_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wantedly%2Fopen_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wantedly","download_url":"https://codeload.github.com/wantedly/open_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529283,"owners_count":21119479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oas","oas3","openapi"],"created_at":"2024-09-25T10:41:24.084Z","updated_at":"2025-04-12T06:30:58.501Z","avatar_url":"https://github.com/wantedly.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenApi [![Gem Version](https://badge.fury.io/rb/open_api.svg)](https://badge.fury.io/rb/open_api) [![Build Status](https://travis-ci.org/wantedly/open_api.svg?branch=master)](https://travis-ci.org/wantedly/open_api) [![Maintainability](https://api.codeclimate.com/v1/badges/dc4713a3cb67f6edce65/maintainability)](https://codeclimate.com/github/wantedly/open_api/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/dc4713a3cb67f6edce65/test_coverage)](https://codeclimate.com/github/wantedly/open_api/test_coverage)\n\n`open_api` provides PORO and serializers for OpenAPI and it supports OpenAPI v3.0.1.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'open_api'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install open_api\n\n## Usage\nIt has two use case:\n\n1. Serializing from PORO to yaml\n2. Deserializing yaml to PORO\n\n### Serializing\n\n```rb\nspec = OpenApi::Specification.new(\n  openapi: \"3.0.1\",\n  info: OpenApi::Info.new(\n    title: \"Awesome API\",\n    description: \"It provides something awesome\",\n    version: \"1.0.0\",\n  ),\n  paths: OpenApi::Paths.new(\n    \"/pets\": OpenApi::PathItem.new(\n      get: OpenApi::Operation.new(\n        description: \"Returns all pets from the system that the user has access to\",\n        responses: OpenApi::Responses.new(\n          \"200\": OpenApi::Response.new(\n            description: \"A list of pets.\",\n            content: {\n              \"application/json\": OpenApi::MediaType.new(\n                schema: OpenApi::Schema.new(\n                  type: \"array\",\n                  items: OpenApi::Reference.new(ref: \"#/components/schemas/pet\"),\n                )\n              )\n            }\n          )\n        )\n      )\n    )\n  )\n)\n\nyaml = OpenApi::Serializers::YamlSerializer.serialize(spec)\nFile.write(\"spec.yml\", yaml)\n```\n\n### Deserializing\n\n```rb\nyaml = File.read(\"spec.yml\")\nspec = OpenApi::Serializers::YamlSerializer.deserialize(yaml)\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, run `bundle exec rake bump:patch` to update the version, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/wantedly/open_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the OpenApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/wantedly/open_api/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwantedly%2Fopen_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwantedly%2Fopen_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwantedly%2Fopen_api/lists"}