GithubHelp home page GithubHelp logo

sbolel / va.gov-vets-json-schema Goto Github PK

View Code? Open in Web Editor NEW

This project forked from department-of-veterans-affairs/vets-json-schema

0.0 1.0 0.0 2.12 MB

JSON Schema for all Vets.gov projects

JavaScript 99.79% Ruby 0.21%

va.gov-vets-json-schema's Introduction

vets-json-schema Build Status

Purpose

Forms on VA.gov use JSON schema to define a common contract for data validation between the front and back ends. This is where those schemas are kept.

Development

Workflow

  1. Clone the vets-json-schema repository

  2. Create a new branch for your changes

  3. Make any required changes needed for your form schema

  4. Update the version number in this repo's package.json

    1. Ensure that you run yarn build to generate the dist/ directory where your form schema will be pulled from
    2. Commit your changes to your branch
  5. Submit a Pull Request in vets-json-schema

  6. Once that PR is merged into vets-json-schema at master

    1. In vets-website to update the vets-json-schema dependency do the following:

      1. Create a new branch
      2. Find the latest commit hash for vets-json-schema#master (see all commits)
      3. Run yarn remove vets-json-schema
      4. Run yarn add https://github.com/department-of-veterans-affairs/vets-json-schema.it\#<commit-hash>
      5. Run yarn update:schema
      6. Create a Pull Request
    2. In vets-api to update the vets-json-schema dependency do the following:

      1. Create a new branch
      2. Run bundle update vets_json_schema

If adding or removing a form, update forms tests in vets-website

Environment

node v8.10.0

I want to...

I want to... Then you should...
clone the repo git clone https://github.com/department-of-veterans-affairs/vets-json-schema.git followed by cd vets-json-schema, yarn install. Run yarn install any time package.json changes.
build the json schemas and examples yarn run build
watch for changes and rebuild when they happen yarn run watch
run tests on the built schemas yarn run test
create a new schema https://github.com/department-of-veterans-affairs/va.gov-team/blob/master/platform/engineering/frontend/vets-website/creating-form-schema.md

Updating Version

  • Update the "version" property in package.json with the new version. Please follow Semantic Versioning practices.
    • If implementing a major version update, add a link in your vets-json-schema PR that references the vets-api, or vets-website, PR that addresses the breaking changes.
    • Breaking changes include:
      • Removing a property from a schema
      • Adding a property to a schema that has additionalProperties set to false
      • Making a property required that was not previously required on that schema
      • Changing the type on a schema's property
      • Removing values in the enum key of a schema's property
      • ect.
  • Run yarn update.
  • Commit the changes to package.json and yarn.lock
  • After changes to vets-json-schema have been merged into master:
    • update vets-website to point to the latest vets-json-schema version by running yarn update:schema and making a PR
    • update vets-api by running bundle update vets_json_schema and making a PR. Caution: verify that you changes are only related to vets_json_schema version. If you see sidekiq changes, follow these instructions

va.gov-vets-json-schema's People

Contributors

lihanli avatar jbalboni avatar markgreenburg avatar cohnjesse avatar micahchiang avatar jholton avatar kevinmirc avatar mottie avatar cvalarida avatar cehsu avatar voidspooks avatar gcionapoleon avatar dependabot[bot] avatar stephenbarrs avatar edmangimelli avatar rlbaker avatar annaswims avatar erikphansen avatar jerekshoe avatar timwright12 avatar hughes-dustin avatar zurbergram avatar batemapf avatar jsimonva avatar michelpmcdonald avatar ksantiagobah avatar shefalinayak-tw avatar scottymeyers avatar abhijitvk avatar bkjohnson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.