{"id":27646254,"url":"https://github.com/znsio/specmatic-example-generation","last_synced_at":"2025-04-24T01:17:49.001Z","repository":{"id":285773507,"uuid":"959163854","full_name":"znsio/specmatic-example-generation","owner":"znsio","description":"Sample project to demonstrate example validation and generation using Specmatic OpenAPI docker image","archived":false,"fork":false,"pushed_at":"2025-04-02T15:17:37.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-02T16:26:32.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/znsio.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":"2025-04-02T11:19:05.000Z","updated_at":"2025-04-02T15:17:41.000Z","dependencies_parsed_at":"2025-04-02T16:38:02.152Z","dependency_job_id":null,"html_url":"https://github.com/znsio/specmatic-example-generation","commit_stats":null,"previous_names":["znsio/specmatic-example-generation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-example-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-example-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-example-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-example-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/znsio","download_url":"https://codeload.github.com/znsio/specmatic-example-generation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250540890,"owners_count":21447428,"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":"2025-04-24T01:17:48.546Z","updated_at":"2025-04-24T01:17:48.985Z","avatar_url":"https://github.com/znsio.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Specmatic Example Generation using Dictionary\nSample project to demonstrate example validation and generation using dictionary with Specmatic OpenAPI docker image\n\n## Usage\n### Get the latest Docker Image\n```shell\ndocker pull znsio/specmatic-openapi:latest\n```\n\n### Use the interactive server to Generate, Validate and Fix Examples\n```shell\ndocker run \\\n      -p 9001:9001 \\\n      -v \"$PWD/specmatic-license.txt:/usr/src/app/specmatic-license.txt\" \\\n      -v \"$PWD/openapi.yaml:/usr/src/app/openapi.yaml\" \\\n      -v \"$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml\" \\\n      -v \"$PWD/openapi_examples:/usr/src/app/openapi_examples\" \\\n      -v \"$PWD/openapi_dictionary.json:/usr/src/app/openapi_dictionary.json\" \\\n      -e SPECMATIC_LICENSE_PATH=/usr/src/app/specmatic-license.txt \\\n      znsio/specmatic-openapi examples interactive --spec-file openapi.yaml\n```\nThis would start the interactive server at `http://localhost:9001` where you can generate, validate and fix examples.\n\n### Generate Examples\n```shell\ndocker run \\\n      -v \"$PWD/specmatic-license.txt:/usr/src/app/specmatic-license.txt\" \\\n      -v \"$PWD/openapi.yaml:/usr/src/app/openapi.yaml\" \\\n      -v \"$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml\" \\\n      -v \"$PWD/openapi_examples:/usr/src/app/openapi_examples\" \\\n      -v \"$PWD/openapi_dictionary.json:/usr/src/app/openapi_dictionary.json\" \\\n      -e SPECMATIC_LICENSE_PATH=/usr/src/app/specmatic-license.txt \\\n      znsio/specmatic-openapi examples generate openapi.yaml\n```\n\n### Validate Examples\n```shell\ndocker run \\\n      -v \"$PWD/specmatic-license.txt:/usr/src/app/specmatic-license.txt\" \\\n      -v \"$PWD/openapi.yaml:/usr/src/app/openapi.yaml\" \\\n      -v \"$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml\" \\\n      -v \"$PWD/openapi_examples:/usr/src/app/openapi_examples\" \\\n      -v \"$PWD/openapi_dictionary.json:/usr/src/app/openapi_dictionary.json\" \\\n      -e SPECMATIC_LICENSE_PATH=/usr/src/app/specmatic-license.txt \\\n      znsio/specmatic-openapi examples validate --spec-file openapi.yaml\n```\n\n### Fix invalid Examples\n```shell\ndocker run \\\n      -v \"$PWD/specmatic-license.txt:/usr/src/app/specmatic-license.txt\" \\\n      -v \"$PWD/openapi.yaml:/usr/src/app/openapi.yaml\" \\\n      -v \"$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml\" \\\n      -v \"$PWD/openapi_examples:/usr/src/app/openapi_examples\" \\\n      -v \"$PWD/openapi_dictionary.json:/usr/src/app/openapi_dictionary.json\" \\\n      -e SPECMATIC_LICENSE_PATH=/usr/src/app/specmatic-license.txt \\\n      znsio/specmatic-openapi examples fix --spec-file openapi.yaml\n```\n\n### Generate Dictionary from external examples\n```shell\ndocker run \\\n      -v \"$PWD/specmatic-license.txt:/usr/src/app/specmatic-license.txt\" \\\n      -v \"$PWD/openapi.yaml:/usr/src/app/openapi.yaml\" \\\n      -v \"$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml\" \\\n      -v \"$PWD/openapi_examples:/usr/src/app/openapi_examples\" \\\n      -v \"$PWD/openapi_dictionary.json:/usr/src/app/openapi_dictionary.json\" \\\n      -e SPECMATIC_LICENSE_PATH=/usr/src/app/specmatic-license.txt \\\n      znsio/specmatic-openapi examples dictionary --out=openapi_dictionary.json --spec-file openapi.yaml\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznsio%2Fspecmatic-example-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznsio%2Fspecmatic-example-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznsio%2Fspecmatic-example-generation/lists"}