The classes and properties of the oneM2M base ontology are described in TS-0012.
Using this GitLab repository it is possible to create branches which contain your own ontology to be used in oneM2M.
Such an ontology needs to reference your own ontology as well as the base ontology - prefereably the latest version - via "include" statements.
It also needs to contain appropriate subClass / subProperty relationship statements that make e.g. class yourDevice a sub-class of class Device of the base ontology.