mirror of
https://github.com/hashicorp/vault.git
synced 2026-04-12 01:01:19 +02:00
* removes doctoc, jsdoc-to-markdown and jsonlint packages and removes underscore version override * removes generate-docs script which uses removed docfy-md scipt Co-authored-by: Jordan Reimer <zofskeez@gmail.com>
1003 B
1003 B
Serializers & Adapters
Guidelines
- Prepend internal functions with an underscore to differentiate from Ember methods
_getUrl - Consider using the named-path adapter if the model name is part of the request path
- Utilize the serializer to remove sending model attributes that do not correspond to an API parameter. Example in key serializer
export default class SomeSerializer extends ApplicationSerializer {
attrs = {
attrName: { serialize: false },
};
}
Note: this will remove the attribute when calling
snapshot.serialize()even if the method is called within the serialize method where custom logic may be written
Gotchas
- The JSON serializer removes attributes with empty arrays Example in MFA serializer