Ontology as a supposed science of being acquired its basic shape in the middle ages, as a sort of reification of Aristotelian semantics. Duns Scotus was very proud of his ontological “improvement” of Aristotle. Aristotle himself preferred to shift clumsy, sterile discussions of sheer being onto more subtle and fruitful registers of form and meaning at the earliest opportunity.
Kant pointed out that existence is not a property, and Hegel pointed out the equivalence of Being to Nothing. When Hegel talks about “logic” as the form of future metaphysics, this means a return to the original meaning of “metaphysics” as Aristotelian dialectical semantics, not an ontologization of dialectic. Broadly Aristotelian dialectical semantics give us all the “ontology” we will ever need.
For the historical back story of how Scotus invented ontology as we know it today, if you read French, see Olivier Boulnois, Être et représentation: Une généalogie de la métaphysique moderne à l’époque de Duns Scot (XIIIe–XIVe siècle). As suggested by the title, this work also has extremely important things to say about the premodern history of strongly representationalist views. The famous univocal “being” invented by Scotus was defined in terms of representability. (See also Being, Existence; Aristotelian Dialectic; Objectivity of Objects; Form; Repraesentatio.)