Skip to content

Include prefixIRI and notation in Class @include_attrs_full #57

Description

@jvendetti

Fetching a class with full: true doesn't return prefixIRI or notation, so concept.prefixIRI and concept.notation come back silently nil. Both are useful for showing a class's short id, and the only way to get them today is to override include entirely, which means restating the whole attribute list in the consumer.

lib/ontologies_api_client/models/class.rb:12:

@include_attrs_full = "prefLabel,definition,synonym,obsolete,properties,hasChildren,childre,inScheme,memberOf"

Proposal: append ,prefixIRI,notation.

Consumers already work around the gap. In bioportal_web_ui, ChangeRequestsController#generate_curie issues a second single_class request with display: 'notation,prefixIRI' purely to read those two values off a class it has usually already fetched.

Both are scalar attributes, so the extra payload is negligible, and adding them is backward compatible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions