# What's In A Name? API A RESTful API for properly formatting and generating multiple representations of individual names. The API handles capitalization, prefixes, suffixes, middle initials, and professional designations. --- ## Base URL ``` http://localhost:8080/v1 ``` --- ## Overview This API takes name components (first name, middle name, last name, prefix, suffix) and returns multiple formats, including: * FirstName LastName * FirstName MiddleInitial LastName * LastName, FirstName * LastName, FirstName MiddleInitial * Prefix FirstName LastName * Prefix FirstName MiddleInitial LastName * Prefix LastName * FirstName LastName Suffix * FirstName MiddleName LastName --- ## Content-Type All **POST** requests must include: ``` Content-Type: application/json ``` --- ## Endpoints ### Format Individual Name **POST** `/individualNames/format` #### Request Body ```json { "firstName": "john", "middleName": "kenneth", "lastName": "doe", "prefix": "dr", "suffix": "jr", "preferredName": "johnny", "professionalDesignation": "PhD" } ``` #### Example Response ```json { "firstName": "John", "middleName": "Kenneth", "lastName": "Doe", "prefix": "Dr", "suffix": "Jr", "preferredName": "johnny", "professionalDesignation": "PhD", "firstNameLastName": "John Doe", "firstNameMiddleNameLastName": "John Kenneth Doe", "firstNameLastNameSuffix": "John Doe Jr", "lastNameFirstName": "Doe, John", "lastNameFirstNameMiddleInitial": "Doe, John K.", "prefixFirstNameLastName": "Dr John Doe", "prefixFirstNameMiddleInitialLastName": "Dr John K. Doe", "prefixLastName": "Dr Doe" } ``` --- ## Examples #### 1. Simple Name Request: ```json { "firstName": "jane", "lastName": "smith" } ``` Response: ```json { "firstNameLastName": "Jane Smith", "lastNameFirstName": "Smith, Jane" } ``` #### 2. Name with Middle Name and Suffix Request: ```json { "firstName": "robert", "middleName": "alan", "lastName": "johnson", "suffix": "III" } ``` Response: ```json { "firstNameMiddleNameLastName": "Robert Alan Johnson", "firstNameLastNameSuffix": "Robert Johnson III", "lastNameFirstNameMiddleInitial": "Johnson, Robert A." } ``` #### 3. Name with Prefix Request: ```json { "prefix": "ms", "firstName": "anna", "lastName": "lee" } ``` Response: ```json { "prefixFirstNameLastName": "Ms Anna Lee", "prefixLastName": "Ms Lee" } ``` --- ## License Specify license information here. --- ## Acknowledgments Developed by John Groller. Inspired by the need for standardized name formatting in applications.