protected int getPropertyIndex(MemberScope<?, ?> property) {
        HierarchicType topMostHierarchyType = property.getDeclaringTypeMembers().allTypesAndOverrides().get(0);
        List<String> sortedProperties = this.propertyOrderPerDeclaringType
                .computeIfAbsent(topMostHierarchyType.getErasedType(), this::getAnnotatedPropertyOrder);
        String fieldName;
        if (property instanceof MethodScope) {
            fieldName = Optional.<MemberScope>ofNullable(((MethodScope) property).findGetterField())
                    // since 4.33.1: fall-back on method's property name if no getter can be found
                    .orElse(property)
                    .getSchemaPropertyName();
        } else {
            fieldName = property.getSchemaPropertyName();
        }
        int propertyIndex = sortedProperties.indexOf(fieldName);
        if (propertyIndex == -1) {
            propertyIndex = Integer.MAX_VALUE;
        }
        return propertyIndex;
    }
Determine the given property's position in its declaring type's schema based on a {@link JsonPropertyOrder} annotation. If no such annotation
is present, {@link Integer#MAX_VALUE} will be returned to append these at the end of the list of properties.

@param property field/method for which the respective index should be determined
@return specific property index or {@link Integer#MAX_VALUE}
jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonPropertySorter.java