{"id":15752724,"url":"https://github.com/devigned/bond-openapi-annotation-sample","last_synced_at":"2025-03-31T07:27:33.817Z","repository":{"id":145071256,"uuid":"72560023","full_name":"devigned/bond-openapi-annotation-sample","owner":"devigned","description":null,"archived":false,"fork":false,"pushed_at":"2016-11-08T16:08:30.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T12:13:37.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/devigned.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2016-11-01T17:32:27.000Z","updated_at":"2016-11-04T18:02:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e2fe257-627e-44a4-a74f-c58bfc56ba75","html_url":"https://github.com/devigned/bond-openapi-annotation-sample","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"5b5b206cb4c8b60a0f7786f4912689aaa23010d7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fbond-openapi-annotation-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fbond-openapi-annotation-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fbond-openapi-annotation-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fbond-openapi-annotation-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devigned","download_url":"https://codeload.github.com/devigned/bond-openapi-annotation-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246431770,"owners_count":20776282,"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":[],"created_at":"2024-10-04T07:04:30.437Z","updated_at":"2025-03-31T07:27:33.796Z","avatar_url":"https://github.com/devigned.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bond / Swagger (OpenAPI) Attribute Sample\nThis sample shows a snippet of Bond IDL which expresses data annotations converted to\na sample OpenAPI document. The OpenAPI document is then validated against both JSON\nDraft 4 schema and OpenAPI 2.0 schema.\n\nThe extension to JSON schema is based on [section 5.6 of JSON Schema Draft 4](http://json-schema.org/latest/json-schema-core.html#anchor20)\n\u003e 5.6.  Extending JSON Schema\n\u003e Implementations MAY choose to define additional keywords to JSON Schema. Save for explicit agreement, schema authors SHALL NOT expect these additional keywords to be supported by peer implementations. Implementations SHOULD ignore keywords they do not support.\n\n## [Bond Sample IDL](./sample/bond/sample.bond)\nBond IDL expressing a data annotation.\n```\nnamespace Examples\n\nstruct QoSEventPartC\n{\n    [DataClass(\"EII\")]\n    10: required string UserEmailAddress;\n    20: optional string UserPUID;\n};\n```\n\n## [OpenAPI Sample](./sample/swagger/sample.json)\nSwagger document specifying both an endpoint as well as `the data schema for QoSEventPartC. See the JSON schema excerpt below:\n```json\n...\n\"definitions\": {\n        \"QoSEventPartC\": {\n            \"type\": \"object\",\n            \"required\": [\n                \"UserEmailAddress\"\n            ],\n            \"properties\": {\n                \"UserEmailAddress\": {\n                    \"type\": \"string\",\n                    \"format\": \"email\",\n                    \"x-ms-attributes\": {\n                        \"Microsoft.Azure.DataClass\": \"EII\"\n                    }\n                },\n                \"UserPUID\": {\n                    \"type\": \"string\"\n                }\n            }\n        }\n    }\n```\n\n## [JSON Payload Representing the Schema Above](./sample/example-payload.json)\nSample JSON document which represents the JSON schema above which corresponds to the Bond IDL\n```json\n{\n  \"UserEmailAddress\": \"blah@foo.com\",\n  \"UserPUID\":  \"foo\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevigned%2Fbond-openapi-annotation-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevigned%2Fbond-openapi-annotation-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevigned%2Fbond-openapi-annotation-sample/lists"}