
{% if class_name is defined %}
{{ module_name }}_{{ class_name | lower }}_form:
  path: '/{{ module_name }}/settings/{{ class_name }}'
  defaults:
    _form: '\Drupal\{{ module_name }}\Form\{{ class_name }}'
    _title: '{{ module_name }} Form'
  requirements:
    _permission: 'access administration pages'
{% endif %}


{% if class_name is defined %}
{{ module_name }}.{{ class_name | lower }}_form:
  path: '/{{ module_name }}/settings/{{ class_name }}'
  defaults:
    _form: '\Drupal\{{ module_name }}\Form\{{ class_name }}'
    _title: '{{ module_name }} Form'
  requirements:
    _permission: 'access administration pages'
{% endif %}

Replace _ with . on form machine_name
Replace _ with . on form machine_name
