Skip to content

IHasMeta does not work #737

Closed
Closed
@bart-degreed

Description

@bart-degreed

Example:

    public class Person : Identifiable, IHasMeta
    {
        [Attr]
        public string FirstName { get; set; }
        
        [Attr]
        public string LastName { get; set; }

        public Dictionary<string, object> GetMeta()
        {
            return new Dictionary<string, object>
            {
                {"copyright", "Copyright 2018 Example Corp."},
                {"authors", new[] {"John Doe"}}
            };
        }
    }
curl https://localhost:44354/people
{"links":{"self":"https://localhost:44354///people"},"data":[{"type":"people","id":"1","attributes":{"firstName":"John","lastName":"Simmons"},"links":{"self":"https://localhost:44354///people/1"}},{"type":"people","id":"2","attributes":{"firstName":"Pete","lastName":"Bell"},"links":{"self":"https://localhost:44354///people/2"}}]}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions