Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Add support for Firestore-specific data types #5

Closed
pheekus opened this issue Aug 27, 2019 · 1 comment
Closed

Add support for Firestore-specific data types #5

pheekus opened this issue Aug 27, 2019 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@pheekus
Copy link
Owner

pheekus commented Aug 27, 2019

Support for Timestamp, Bytes, LatLng and Path is currently missing. v1 must have at least basic support for these types using the following syntax:

{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "FirestoreTypes",
  "type": "object",
  "definitions": {
    "Timestamp": {},
    "Bytes": {},
    "LatLng": {},
    "Path": {}
  },
  "properties": {
    "date": { "$ref": "#/definitions/Timestamp" },
    "bytes": { "$ref": "#/definitions/Bytes" },
    "location": { "$ref": "#/definitions/LatLng" },
    "document": { "$ref": "#/definitions/Path" }
  }
}

Compiler could look for $ref in property declaration and add basic type checking based on the provided value. This way only refs defined as shown above would work, but that'd be enough until a better approach is found.

Docs would need to be updated for this as well.

@pheekus pheekus added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 27, 2019
@pheekus pheekus self-assigned this Aug 27, 2019
pheekus added a commit that referenced this issue Aug 27, 2019
This commit adds basic support for Timestamp, Bytes, LatLng and Path.

re #5
@pheekus
Copy link
Owner Author

pheekus commented Aug 27, 2019

Closed by #6, merged into dev branch.

@pheekus pheekus closed this as completed Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant