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

Allow Mockgun to apply schema modifications #198

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on May 3, 2019

  1. Add schema writing functionality to SchemaFactory class

    This works opposite to the get_schemas function
    Alex committed May 3, 2019
    Configuration menu
    Copy the full SHA
    0d306b9 View commit details
    Browse the repository at this point in the history
  2. Implement schema_field_create/update/delete

    We implement the create and update using a new internal helper called `_set_property`.
    This new method will recursively search the passed current property dictionary and attempt to find all keys matching the key you pass in and update it's value to the value you have passed in.
    
    If it cannot find the value in the current dictionary but it does find a "properties" dictionary, it will add a new entry in the "properties" dictionary.
    This "properties" dictionary appears to only exist on the root of the properties dictionary.
    
    A `schema_field_update` does a deep copy of the properties before updating them whereas the `schema_field_create` method starts from a base schema_field dictionary and updates it with what you pass in.
    
    This does not deal with setting "editable" values in each of these keys. We are assuming, in Mockgun, that you are allowed to change anything in the schema.
    Perhaps someone from the team at Shotgun will have some clear logic that will allow us to implement that.
    Alex committed May 3, 2019
    Configuration menu
    Copy the full SHA
    6a6e973 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2019

  1. Update file descriptor when writing

    Alex committed May 21, 2019
    Configuration menu
    Copy the full SHA
    43c519e View commit details
    Browse the repository at this point in the history